Yet more debug logging
This commit is contained in:
parent
2bc85cf6d6
commit
e0f735e47a
11
dist/index.js
vendored
11
dist/index.js
vendored
@ -25719,6 +25719,11 @@ function getCommitsSinceLatestBeforeGivenDate(dir, date) {
|
|||||||
// No commits in the target repo - return an empty array, which will result in the first representative commit
|
// No commits in the target repo - return an empty array, which will result in the first representative commit
|
||||||
// being made as the first commit. And then we can iterate as normal (recalling that the target history is
|
// being made as the first commit. And then we can iterate as normal (recalling that the target history is
|
||||||
// refreshed _from local repo_ - incurring no network charges) from there on.
|
// refreshed _from local repo_ - incurring no network charges) from there on.
|
||||||
|
if (error.output == undefined) {
|
||||||
|
throw Error(`Unexpected error while building target commit history`, {
|
||||||
|
cause: error
|
||||||
|
});
|
||||||
|
}
|
||||||
const errorOutputAsString = '' + error.output[2];
|
const errorOutputAsString = '' + error.output[2];
|
||||||
if (!errorOutputAsString.includes('does not have any commits yet')) {
|
if (!errorOutputAsString.includes('does not have any commits yet')) {
|
||||||
console.log(`Unexpected error: ${errorOutputAsString}`);
|
console.log(`Unexpected error: ${errorOutputAsString}`);
|
||||||
@ -25790,7 +25795,13 @@ function createRepresentativeCommit(dir, sourceRepo, sourceCommit) {
|
|||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
console.log(`DEBUG - e is ${e}`);
|
||||||
const error = e;
|
const error = e;
|
||||||
|
if (error.output == undefined) {
|
||||||
|
throw Error(`Unexpected error while creating representative commit`, {
|
||||||
|
cause: error
|
||||||
|
});
|
||||||
|
}
|
||||||
console.log(`DEBUG - error while creating representative commit: ${'' + error.output[2]} ... ${'' + error.output[1]}`);
|
console.log(`DEBUG - error while creating representative commit: ${'' + error.output[2]} ... ${'' + error.output[1]}`);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
BIN
node_modules/@vercel/ncc/dist/ncc/cli.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/cli.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/index.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/index.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache
generated
vendored
Binary file not shown.
11
src/git.ts
11
src/git.ts
@ -74,6 +74,11 @@ export function getCommitsSinceLatestBeforeGivenDate(dir: string, date: Date): C
|
|||||||
// No commits in the target repo - return an empty array, which will result in the first representative commit
|
// No commits in the target repo - return an empty array, which will result in the first representative commit
|
||||||
// being made as the first commit. And then we can iterate as normal (recalling that the target history is
|
// being made as the first commit. And then we can iterate as normal (recalling that the target history is
|
||||||
// refreshed _from local repo_ - incurring no network charges) from there on.
|
// refreshed _from local repo_ - incurring no network charges) from there on.
|
||||||
|
if (error.output == undefined) {
|
||||||
|
throw Error(`Unexpected error while building target commit history`, {
|
||||||
|
cause: error
|
||||||
|
})
|
||||||
|
}
|
||||||
const errorOutputAsString = '' + error.output[2]
|
const errorOutputAsString = '' + error.output[2]
|
||||||
if (!errorOutputAsString.includes('does not have any commits yet')) {
|
if (!errorOutputAsString.includes('does not have any commits yet')) {
|
||||||
console.log(`Unexpected error: ${errorOutputAsString}`);
|
console.log(`Unexpected error: ${errorOutputAsString}`);
|
||||||
@ -150,7 +155,13 @@ function createRepresentativeCommit(dir: string, sourceRepo: RepoId,sourceCommit
|
|||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
console.log(`DEBUG - e is ${e}`);
|
||||||
const error = e as ExecSyncError;
|
const error = e as ExecSyncError;
|
||||||
|
if (error.output == undefined) {
|
||||||
|
throw Error(`Unexpected error while creating representative commit`, {
|
||||||
|
cause: error
|
||||||
|
})
|
||||||
|
}
|
||||||
console.log(`DEBUG - error while creating representative commit: ${'' + error.output[2]} ... ${'' + error.output[1]}`);
|
console.log(`DEBUG - error while creating representative commit: ${'' + error.output[2]} ... ${'' + error.output[1]}`);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user