sisyphi 1.1.29 → 1.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +7 -12
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -10319,13 +10319,8 @@ function captureGit(args2) {
|
|
|
10319
10319
|
}
|
|
10320
10320
|
function inferRepoName() {
|
|
10321
10321
|
const { stdout, ok } = captureGit(["rev-parse", "--show-toplevel"]);
|
|
10322
|
-
if (
|
|
10323
|
-
|
|
10324
|
-
}
|
|
10325
|
-
if (!stdout) {
|
|
10326
|
-
throw new Error("git rev-parse returned empty toplevel.");
|
|
10327
|
-
}
|
|
10328
|
-
return basename6(stdout);
|
|
10322
|
+
if (ok && stdout) return basename6(stdout);
|
|
10323
|
+
return basename6(process.cwd());
|
|
10329
10324
|
}
|
|
10330
10325
|
function getOriginUrl() {
|
|
10331
10326
|
const { stdout, ok } = captureGit(["remote", "get-url", "origin"]);
|
|
@@ -10334,10 +10329,8 @@ function getOriginUrl() {
|
|
|
10334
10329
|
}
|
|
10335
10330
|
function getRepoToplevel() {
|
|
10336
10331
|
const { stdout, ok } = captureGit(["rev-parse", "--show-toplevel"]);
|
|
10337
|
-
if (
|
|
10338
|
-
|
|
10339
|
-
}
|
|
10340
|
-
return stdout;
|
|
10332
|
+
if (ok && stdout) return stdout;
|
|
10333
|
+
return process.cwd();
|
|
10341
10334
|
}
|
|
10342
10335
|
var DEFAULT_EXCLUDES = [
|
|
10343
10336
|
".sisyphus/",
|
|
@@ -10431,7 +10424,9 @@ Pass --name <slug> to disambiguate, or --fresh to overwrite.`
|
|
|
10431
10424
|
}
|
|
10432
10425
|
if (opts.fresh) {
|
|
10433
10426
|
if (!localOrigin) {
|
|
10434
|
-
throw new Error(
|
|
10427
|
+
throw new Error(
|
|
10428
|
+
"--fresh requires an `origin` remote on the local repo. Not available when running from a non-git parent dir."
|
|
10429
|
+
);
|
|
10435
10430
|
}
|
|
10436
10431
|
if (!opts.yes) {
|
|
10437
10432
|
console.log(`This will wipe ~/projects/${repo} on the box and re-clone from ${localOrigin}.`);
|