Skip to content

Commit 3d94485

Browse files
committed
chore: adjust error messages
Signed-off-by: Ruben Romero Montes <[email protected]>
1 parent feb0791 commit 3d94485

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

.github/workflows/pr.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ jobs:
2929
node-version: ${{ matrix.node }}
3030
cache: npm
3131

32+
- name: Enable Corepack
33+
run: corepack enable
34+
35+
- name: Prepare Yarn
36+
run: corepack prepare [email protected] --activate
37+
38+
- name: Prepare PNPM
39+
run: corepack prepare pnpm@latest --activate
40+
3241
- name: Setup Java 17
3342
uses: actions/setup-java@v4
3443
with:
@@ -51,9 +60,6 @@ jobs:
5160
with:
5261
go-version: '1.20.1'
5362

54-
- name: Install pnpm
55-
run: npm install -g pnpm
56-
5763
- name: Setup Gradle
5864
uses: gradle/actions/setup-gradle@v4
5965

.github/workflows/stage.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ jobs:
4646
cache: npm
4747
registry-url: 'https://npm.pkg.github.com'
4848

49+
- name: Enable Corepack
50+
run: corepack enable
51+
52+
- name: Prepare Yarn
53+
run: corepack prepare [email protected] --activate
54+
55+
- name: Prepare PNPM
56+
run: corepack prepare pnpm@latest --activate
57+
58+
4959
- name: Setup Java 17
5060
uses: actions/setup-java@v4
5161
with:

src/providers/base_javascript.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,12 @@ export default class Base_javascript {
317317
return invokeCommand(this.#cmd, args, opts);
318318
} catch (error) {
319319
if (error.code === 'ENOENT') {
320-
throw new Error(`${this.#cmd} is not accessible. Please ensure it is installed and available in your PATH.`);
320+
throw new Error(`${this.#cmd} is not accessible.`);
321321
}
322322
if (error.code === 'EACCES') {
323323
throw new Error(`Permission denied when executing ${this.#cmd}. Please check file permissions.`);
324324
}
325-
throw new Error(`Failed to execute ${this.#cmd} ${args.join(' ')}: ${error.message}`, { cause: error });
325+
throw new Error(`Failed to execute ${this.#cmd} ${args.join(' ')}`, { cause: error });
326326
}
327327
}
328328

0 commit comments

Comments
 (0)