mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-28 13:46:33 +00:00
patch: fix sidecar build for windows
This commit is contained in:
parent
8c52350588
commit
a61652a0b8
@ -62,7 +62,7 @@ function build(
|
|||||||
const commands: Array<[string, string[]]> = [
|
const commands: Array<[string, string[]]> = [
|
||||||
[
|
[
|
||||||
'tsc',
|
'tsc',
|
||||||
['--project', 'tsconfig.sidecar.json', '--outDir', `'${sourcesDir}'`],
|
['--project', 'tsconfig.sidecar.json', '--outDir', `${sourcesDir}`],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ function build(
|
|||||||
commands.push([
|
commands.push([
|
||||||
'pkg',
|
'pkg',
|
||||||
[
|
[
|
||||||
`'${path.join(sourcesDir, 'util', 'api.js')}'`,
|
`${path.join(sourcesDir, 'util', 'api.js')}`,
|
||||||
'-c',
|
'-c',
|
||||||
'pkg-sidecar.json',
|
'pkg-sidecar.json',
|
||||||
// `--no-bytecode` so that we can cross-compile for arm64 on x64
|
// `--no-bytecode` so that we can cross-compile for arm64 on x64
|
||||||
@ -89,16 +89,18 @@ function build(
|
|||||||
'--target',
|
'--target',
|
||||||
arch,
|
arch,
|
||||||
'--output',
|
'--output',
|
||||||
`'${binPath}'`,
|
`${binPath}`,
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
commands.push(['ls', ['-alFR', `'${binDir}'`]]);
|
//commands.push(['ls', ['-alFR', `'${binDir}'`]]);
|
||||||
});
|
});
|
||||||
|
|
||||||
commands.forEach(([cmd, args]) => {
|
commands.forEach(([cmd, args]) => {
|
||||||
debug('running command:', cmd, args.join(' '));
|
debug('running command:', cmd, args.join(' '));
|
||||||
execFileSync(cmd, args, { shell: 'bash', stdio: 'inherit' });
|
try {
|
||||||
|
execFileSync(cmd, args, { shell: true, stdio: 'inherit' });
|
||||||
|
} catch (error) {console.log(error)}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user