@nu-art/commando 0.204.38 → 0.204.40
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/cli/pnpm.js +2 -0
- package/core/cli.js +4 -2
- package/package.json +1 -1
package/cli/pnpm.js
CHANGED
|
@@ -28,6 +28,7 @@ class Cli_PNPM extends ts_common_1.Logger {
|
|
|
28
28
|
this.isInstalled = () => !!process.env[this._homeEnvVar];
|
|
29
29
|
this.installPackages = async (commando) => {
|
|
30
30
|
await (commando !== null && commando !== void 0 ? commando : cli_1.Commando.create())
|
|
31
|
+
.append(`source /home/jenkins/.bashrc`)
|
|
31
32
|
.append(`pnpm store prune`)
|
|
32
33
|
.append(`pnpm install -f --no-frozen-lockfile --prefer-offline false`)
|
|
33
34
|
.execute();
|
|
@@ -78,6 +79,7 @@ class Cli_PNPM extends ts_common_1.Logger {
|
|
|
78
79
|
}
|
|
79
80
|
async getVersion() {
|
|
80
81
|
const commando = cli_1.Commando.create(programming_1.Cli_Programming, basic_1.Cli_Basic);
|
|
82
|
+
commando.append(`source /home/jenkins/.bashrc`);
|
|
81
83
|
return commando.if('[[ -x "$(command -v pnpm)" ]]', (commando) => {
|
|
82
84
|
commando.cli.append('pnpm --version');
|
|
83
85
|
}).execute();
|
package/core/cli.js
CHANGED
|
@@ -25,7 +25,7 @@ class BaseCLI extends ts_common_1.Logger {
|
|
|
25
25
|
this.stderrProcessors = [];
|
|
26
26
|
this.commands = [];
|
|
27
27
|
this.indentation = 0;
|
|
28
|
-
this._debug =
|
|
28
|
+
this._debug = true;
|
|
29
29
|
this.uid = (0, ts_common_1.generateHex)((8));
|
|
30
30
|
this.getIndentation = () => {
|
|
31
31
|
return ' '.repeat(this.option.indentation * this.indentation);
|
|
@@ -156,9 +156,11 @@ class Cli extends BaseCLI {
|
|
|
156
156
|
const errorLogs = stderr.split('\n');
|
|
157
157
|
const { filteredIn, filteredOut } = (0, ts_common_1.filterInOut)(errorLogs, this.stderrValidator);
|
|
158
158
|
stderr = filteredIn.join('\n').trim();
|
|
159
|
-
stdout += `from stderr: \n${filteredOut.join('\n')}`;
|
|
160
159
|
if (stderr && stderr.length > 0)
|
|
161
160
|
reject(stderr);
|
|
161
|
+
const stdErrToOut = filteredOut.join('\n').trim();
|
|
162
|
+
if (stdErrToOut && stdErrToOut.length > 0)
|
|
163
|
+
stdout += `from stderr: \n${stdErrToOut}`;
|
|
162
164
|
if (stdout) {
|
|
163
165
|
this.stdoutProcessors.forEach(processor => processor(stdout));
|
|
164
166
|
this.logInfo(stdout);
|