@aws/create-nx-workspace 0.112.0 → 0.112.1
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/bin/index.cjs +4 -4
- package/package.json +1 -1
package/bin/index.cjs
CHANGED
|
@@ -139,10 +139,9 @@ const detectPackageManager = () => {
|
|
|
139
139
|
if (userAgent.startsWith("bun/")) return "bun";
|
|
140
140
|
if (userAgent.startsWith("npm/")) return "npm";
|
|
141
141
|
};
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
*/
|
|
142
|
+
const isNonInteractive = (flagArgs) => flagArgs.some((a) => a === "--no-interactive" || a === "--interactive=false");
|
|
143
|
+
const hasSkipGitFlag = (flagArgs) => flagArgs.some((a) => a === "--skipGit" || a.startsWith("--skipGit="));
|
|
144
|
+
const hasCiOverride = (flagArgs) => flagArgs.some((a) => a.startsWith("--ci") || a.startsWith("--nxCloud"));
|
|
146
145
|
const buildArgs = (args) => {
|
|
147
146
|
const positionalArgs = args.filter((a) => !a.startsWith("-"));
|
|
148
147
|
const flagArgs = args.filter((a) => a.startsWith("-"));
|
|
@@ -151,6 +150,7 @@ const buildArgs = (args) => {
|
|
|
151
150
|
const pm = detectPackageManager();
|
|
152
151
|
if (pm) defaultFlags.push(`--pm=${pm}`);
|
|
153
152
|
}
|
|
153
|
+
if (isNonInteractive(flagArgs) && !hasCiOverride(flagArgs) && !hasSkipGitFlag(flagArgs)) defaultFlags.push("--skipGit");
|
|
154
154
|
const flagsToAdd = defaultFlags.filter((flag) => !flagArgs.some((a) => a.startsWith(flag.split("=")[0])));
|
|
155
155
|
return [
|
|
156
156
|
...positionalArgs,
|