@nestjs/cli 11.0.11 → 11.0.12
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/actions/start.action.js
CHANGED
|
@@ -5,14 +5,13 @@ const ansis_1 = require("ansis");
|
|
|
5
5
|
const child_process_1 = require("child_process");
|
|
6
6
|
const fs = require("fs");
|
|
7
7
|
const path_1 = require("path");
|
|
8
|
-
const os_1 = require("os");
|
|
9
8
|
const get_tsc_config_path_1 = require("../lib/compiler/helpers/get-tsc-config.path");
|
|
10
9
|
const get_value_or_default_1 = require("../lib/compiler/helpers/get-value-or-default");
|
|
11
10
|
const defaults_1 = require("../lib/configuration/defaults");
|
|
12
11
|
const ui_1 = require("../lib/ui");
|
|
13
12
|
const tree_kill_1 = require("../lib/utils/tree-kill");
|
|
14
|
-
const build_action_1 = require("./build.action");
|
|
15
13
|
const type_assertions_1 = require("../lib/utils/type-assertions");
|
|
14
|
+
const build_action_1 = require("./build.action");
|
|
16
15
|
class StartAction extends build_action_1.BuildAction {
|
|
17
16
|
async handle(commandInputs, commandOptions) {
|
|
18
17
|
try {
|
|
@@ -34,8 +33,7 @@ class StartAction extends build_action_1.BuildAction {
|
|
|
34
33
|
const entryFile = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'entryFile', appName, 'entryFile', commandOptions, defaults_1.defaultConfiguration.entryFile);
|
|
35
34
|
const sourceRoot = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'sourceRoot', appName, 'sourceRoot', commandOptions, defaults_1.defaultConfiguration.sourceRoot);
|
|
36
35
|
const shellOption = commandOptions.find((option) => option.name === 'shell');
|
|
37
|
-
const
|
|
38
|
-
const useShell = shellOption?.value !== false && isWindows;
|
|
36
|
+
const useShell = !!shellOption?.value;
|
|
39
37
|
const envFileOption = commandOptions.find((option) => option.name === 'envFile');
|
|
40
38
|
const envFile = (envFileOption?.value ?? []);
|
|
41
39
|
const onSuccess = this.createOnSuccessHook(entryFile, sourceRoot, debugFlag, outDir, binaryToRun, {
|
|
@@ -16,10 +16,10 @@ class AbstractRunner {
|
|
|
16
16
|
const options = {
|
|
17
17
|
cwd,
|
|
18
18
|
stdio: collect ? 'pipe' : 'inherit',
|
|
19
|
-
shell:
|
|
19
|
+
shell: true,
|
|
20
20
|
};
|
|
21
21
|
return new Promise((resolve, reject) => {
|
|
22
|
-
const child = (0, child_process_1.spawn)(this.binary
|
|
22
|
+
const child = (0, child_process_1.spawn)(`${this.binary}`, [...this.args, ...args], options);
|
|
23
23
|
if (collect) {
|
|
24
24
|
child.stdout.on('data', (data) => resolve(data.toString().replace(/\r\n|\n/, '')));
|
|
25
25
|
}
|