Skip to content

Commit 95225ab

Browse files
clean up some cli args and options
1 parent c5d4f6c commit 95225ab

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/cli.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ program.command('hub-path')
167167

168168
program.command('hub')
169169
.description('Run commands directly to the Unity Hub. (You need not to pass --headless or -- to this command).')
170-
.allowUnknownOption(true)
171170
.argument('<args...>', 'Arguments to pass to the Unity Hub executable.')
172171
.option('--verbose', 'Enable verbose logging.')
173172
.action(async (args: string[], options) => {
@@ -341,12 +340,11 @@ program.command('open-project')
341340

342341
program.command('run')
343342
.description('Run command line args directly to the Unity Editor.')
344-
.option('-e, --unity-editor <unityEditorPath>', 'The path to the Unity Editor executable. If unspecified, -u, --unity-project or the UNITY_EDITOR_PATH environment variable must be set.')
345-
.option('-p, --unity-project <unityProjectPath>', 'The path to a Unity project. If unspecified, the UNITY_PROJECT_PATH environment variable or the current working directory will be used.')
343+
.option('--unity-editor <unityEditorPath>', 'The path to the Unity Editor executable. If unspecified, --unity-project or the UNITY_EDITOR_PATH environment variable must be set.')
344+
.option('--unity-project <unityProjectPath>', 'The path to a Unity project. If unspecified, the UNITY_PROJECT_PATH environment variable or the current working directory will be used.')
346345
.option('--log-name <logName>', 'The name of the log file.')
347-
.allowUnknownOption(true)
348-
.argument('<args...>', 'Arguments to pass to the Unity Editor executable.')
349346
.option('--verbose', 'Enable verbose logging.')
347+
.argument('<args...>', 'Arguments to pass to the Unity Editor executable.')
350348
.action(async (args: string[], options) => {
351349
if (options.verbose) {
352350
Logger.instance.logLevel = LogLevel.DEBUG;
@@ -374,7 +372,7 @@ program.command('run')
374372
}
375373

376374
if (!unityEditor) {
377-
throw new Error('The Unity Editor path was not specified. Use -e or --unity-editor to specify it, or set the UNITY_EDITOR_PATH environment variable.');
375+
throw new Error('The Unity Editor path was not specified. Use --unity-editor to specify it or set the UNITY_EDITOR_PATH environment variable.');
378376
}
379377

380378
if (!args.includes('-logFile')) {

0 commit comments

Comments
 (0)