mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-28 05:36:34 +00:00
Merge pull request #3077 from balena-io/fix-start-script
Fix start script
This commit is contained in:
commit
8eeb81f58e
10
afterPack.js
10
afterPack.js
@ -14,12 +14,16 @@ exports.default = function(context) {
|
|||||||
cp.execFileSync('mv', [scriptPath, binPath])
|
cp.execFileSync('mv', [scriptPath, binPath])
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
scriptPath,
|
scriptPath,
|
||||||
outdent`
|
outdent({trimTrailingNewline: false})`
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Resolve symlinks. Warning, readlink -f doesn't work on MacOS/BSD
|
||||||
|
script_dir="$(dirname "$(readlink -f "\${BASH_SOURCE[0]}")")"
|
||||||
|
|
||||||
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
|
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
|
||||||
"\${BASH_SOURCE%/*}"/${context.packager.executableName}.bin "$@"
|
"\${script_dir}"/${context.packager.executableName}.bin "$@"
|
||||||
else
|
else
|
||||||
"\${BASH_SOURCE%/*}"/${context.packager.executableName}.bin "$@" --no-sandbox
|
"\${script_dir}"/${context.packager.executableName}.bin "$@" --no-sandbox
|
||||||
fi
|
fi
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as SimpleProgressWebpackPlugin from 'simple-progress-webpack-plugin';
|
import * as SimpleProgressWebpackPlugin from 'simple-progress-webpack-plugin';
|
||||||
|
import { BannerPlugin } from 'webpack';
|
||||||
import * as nodeExternals from 'webpack-node-externals';
|
import * as nodeExternals from 'webpack-node-externals';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -84,6 +85,14 @@ const guiConfig = {
|
|||||||
gui: path.join(__dirname, 'lib', 'gui', 'app', 'app.ts'),
|
gui: path.join(__dirname, 'lib', 'gui', 'app', 'app.ts'),
|
||||||
},
|
},
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
|
plugins: [
|
||||||
|
...commonConfig.plugins,
|
||||||
|
// Remove "Download the React DevTools for a better development experience" message
|
||||||
|
new BannerPlugin({
|
||||||
|
banner: '__REACT_DEVTOOLS_GLOBAL_HOOK__ = { isDisabled: true };',
|
||||||
|
raw: true,
|
||||||
|
}),
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
const etcherConfig = {
|
const etcherConfig = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user