Skip to content

Commit 8045b77

Browse files
flovogtmatz3
authored andcommitted
Remove try/catch in isWorkspace
1 parent a6f2267 commit 8045b77

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

scripts/isWorkspace.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
66
import {createRequire} from "node:module";
77
const require = createRequire(import.meta.url);
88

9-
try {
10-
const cPath = require.resolve("@ui5/cli/package.json");
11-
const cliPath = path.relative(__dirname, path.dirname(cPath));
9+
const cPath = require.resolve("@ui5/cli/package.json");
10+
const cliPath = path.relative(__dirname, path.dirname(cPath));
1211

13-
// no workspace detected
14-
if (!cliPath.startsWith("..")) {
15-
process.exit(1);
16-
}
17-
} catch (error) {
18-
console.log(error);
12+
// no workspace detected
13+
if (!cliPath.startsWith("..")) {
1914
process.exit(1);
2015
}

0 commit comments

Comments
 (0)