@adinsure-ops/ops-cli 5.4.1-rc3 → 5.4.1-rc4

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.
@@ -32,15 +32,19 @@ export default class CommandBase extends Command {
32
32
  }
33
33
  getYarnVersion() {
34
34
  return __awaiter(this, void 0, void 0, function* () {
35
- // corepack writes an informational "about to download" notice to
36
- // stderr when it needs to fetch a yarn version that isn't installed
37
- // yet, even on success, so stderr content alone isn't a failure signal.
38
35
  const output = yield this.childProcess.runCommand(['yarn', '--version']);
39
- const version = output.data.trim();
40
- if (version) {
41
- return version;
36
+ if (output.error && !output.error.includes('Corepack is about to download')) {
37
+ ux.action.stop(`${chalk.red(output.error)}`);
38
+ }
39
+ else {
40
+ const version = output.data.split('\n')[0];
41
+ if (version) {
42
+ return version;
43
+ }
44
+ else {
45
+ ux.action.stop(`${chalk.red('failed getting yarn version')}`);
46
+ }
42
47
  }
43
- ux.action.stop(`${chalk.red(output.error || 'failed getting yarn version')}`);
44
48
  throw new Error(`Could not resolve yarn version.`);
45
49
  });
46
50
  }
@@ -1859,5 +1859,5 @@
1859
1859
  ]
1860
1860
  }
1861
1861
  },
1862
- "version": "5.4.1-rc3"
1862
+ "version": "5.4.1-rc4"
1863
1863
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adinsure-ops/ops-cli",
3
3
  "description": "Operations CLI for working with AdInsure",
4
- "version": "5.4.1-rc3",
4
+ "version": "5.4.1-rc4",
5
5
  "author": "Adacta Digital Service Department",
6
6
  "bin": {
7
7
  "ops": "./bin/run.js"