🐛 update exec
This commit is contained in:
7
bin/utils/shell.ts
vendored
7
bin/utils/shell.ts
vendored
@@ -6,11 +6,14 @@ export async function shellExec(command: string) {
|
|||||||
const { exitCode } = await execa(command, {
|
const { exitCode } = await execa(command, {
|
||||||
cwd: npmDirectory,
|
cwd: npmDirectory,
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
|
shell: true,
|
||||||
});
|
});
|
||||||
return exitCode;
|
return exitCode;
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
|
const exitCode = error.exitCode ?? 'unknown';
|
||||||
|
const errorMessage = error.message || 'Unknown error occurred';
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Error occurred while executing command "${command}". Exit code: ${error.exitCode}`,
|
`Error occurred while executing command "${command}". Exit code: ${exitCode}. Details: ${errorMessage}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
dist/cli.js
vendored
7
dist/cli.js
vendored
@@ -19,7 +19,7 @@ import { fileTypeFromBuffer } from 'file-type';
|
|||||||
import * as psl from 'psl';
|
import * as psl from 'psl';
|
||||||
|
|
||||||
var name = "pake-cli";
|
var name = "pake-cli";
|
||||||
var version$1 = "3.2.0-beta";
|
var version$1 = "3.2.0-beta1";
|
||||||
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。";
|
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。";
|
||||||
var engines = {
|
var engines = {
|
||||||
node: ">=16.0.0"
|
node: ">=16.0.0"
|
||||||
@@ -319,11 +319,14 @@ async function shellExec(command) {
|
|||||||
const { exitCode } = await execa(command, {
|
const { exitCode } = await execa(command, {
|
||||||
cwd: npmDirectory,
|
cwd: npmDirectory,
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
|
shell: true,
|
||||||
});
|
});
|
||||||
return exitCode;
|
return exitCode;
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
throw new Error(`Error occurred while executing command "${command}". Exit code: ${error.exitCode}`);
|
const exitCode = error.exitCode ?? 'unknown';
|
||||||
|
const errorMessage = error.message || 'Unknown error occurred';
|
||||||
|
throw new Error(`Error occurred while executing command "${command}". Exit code: ${exitCode}. Details: ${errorMessage}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pake-cli",
|
"name": "pake-cli",
|
||||||
"version": "3.2.0-beta",
|
"version": "3.2.0-beta1",
|
||||||
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。",
|
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0"
|
"node": ">=16.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user