Skip to content

Commit a604f66

Browse files
authored
fix(cli): correctly wire up --skip-git opt (#3886)
1 parent d9323d7 commit a604f66

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/api/cli/src/electron-forge-import.ts

+5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@ program
1010
.version(packageJSON.version, '-V, --version', 'Output the current version.')
1111
.helpOption('-h, --help', 'Output usage information.')
1212
.argument('[dir]', 'Directory of the project to import. (default: current directory)')
13+
.option('--skip-git', 'Skip initializing a git repository in the imported project.', false)
1314
.action(async (dir: string) => {
1415
const workingDir = resolveWorkingDir(dir, false);
16+
17+
const options = program.opts();
18+
1519
await api.import({
1620
dir: workingDir,
1721
interactive: true,
22+
skipGit: !!options.skipGit,
1823
});
1924
})
2025
.parse(process.argv);

packages/api/cli/src/electron-forge-init.ts

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ program
2424
interactive: true,
2525
copyCIFiles: !!options.copyCiFiles,
2626
force: !!options.force,
27+
skipGit: !!options.skipGit,
2728
};
2829
if (options.template) initOpts.template = options.template;
2930

0 commit comments

Comments
 (0)