mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 11:16:39 +00:00
patch: rebuild mountutils in forge.sidecar
This commit is contained in:
parent
f6160df454
commit
587701e9ab
@ -59,7 +59,7 @@ function build(
|
||||
binDir: string,
|
||||
binName: string,
|
||||
) {
|
||||
const commands: Array<[string, string[]]> = [
|
||||
const commands: Array<[string, string[], object?]> = [
|
||||
[
|
||||
'tsc',
|
||||
['--project', 'tsconfig.sidecar.json', '--outDir', `${sourcesDir}`],
|
||||
@ -73,7 +73,10 @@ function build(
|
||||
path.resolve(binDir, binName)
|
||||
: // otherwise build in arch-specific directory within binDir
|
||||
path.resolve(binDir, arch, binName);
|
||||
|
||||
|
||||
// FIXME: rebuilding mountutils shouldn't be necessary, but it is. It's comming from etcher-sdk a fix has been upstreamed but to use the latest etcher-sdk we need to upgrade axios at the same time)
|
||||
commands.push(['npm', ['run', 'rebuild'], { cwd: 'node_modules/mountutils' }])
|
||||
|
||||
commands.push([
|
||||
'pkg',
|
||||
[
|
||||
@ -86,8 +89,8 @@ function build(
|
||||
'--public-packages',
|
||||
'"*"',
|
||||
// always build for host platform and node version
|
||||
'--target',
|
||||
arch,
|
||||
// https://github.com/vercel/pkg-fetch/releases
|
||||
`--target node18-${arch}`,
|
||||
'--output',
|
||||
`${binPath}`,
|
||||
],
|
||||
@ -96,10 +99,10 @@ function build(
|
||||
//commands.push(['ls', ['-alFR', `'${binDir}'`]]);
|
||||
});
|
||||
|
||||
commands.forEach(([cmd, args]) => {
|
||||
commands.forEach(([cmd, args, opt]) => {
|
||||
debug('running command:', cmd, args.join(' '));
|
||||
try {
|
||||
execFileSync(cmd, args, { shell: true, stdio: 'inherit' });
|
||||
execFileSync(cmd, args, { shell: true, stdio: 'inherit', ...opt });
|
||||
} catch (error) {console.log(error)}
|
||||
});
|
||||
}
|
||||
|
1
npm-shrinkwrap.json
generated
1
npm-shrinkwrap.json
generated
@ -7,6 +7,7 @@
|
||||
"": {
|
||||
"name": "balena-etcher",
|
||||
"version": "1.18.13",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@balena/sudo-prompt": "9.2.1-workaround-windows-amperstand-in-username-0849e215b947987a643fe5763902aea201255534",
|
||||
|
Loading…
x
Reference in New Issue
Block a user