Commit 7dce51a1 authored by Axel Chalon's avatar Axel Chalon Committed by Thibaut Sardan
Browse files

Use path.join in fetch-latest-parity.js (#489)

parent 0f36f18e
Pipeline #34809 passed with stages
in 10 minutes and 15 seconds
......@@ -32,11 +32,16 @@ switch (process.platform) {
const ENDPOINT = `https://vanity-service.parity.io/parity-binaries?os=${os}&architecture=x86_64`;
const STATIC_DIRECTORY = '../packages/fether-electron/static/';
const STATIC_DIRECTORY = path.join(
'..',
'packages',
'fether-electron',
'static'
);
const foundPath = [
path.join(STATIC_DIRECTORY, '/parity'),
path.join(STATIC_DIRECTORY, '/parity.exe')
path.join(STATIC_DIRECTORY, 'parity'),
path.join(STATIC_DIRECTORY, 'parity.exe')
].find(existsSync);
if (foundPath) {
......@@ -124,7 +129,7 @@ function downloadParity () {
}
// Write to file and set a+x permissions
const destinationPath = `${STATIC_DIRECTORY}/${name}`;
const destinationPath = path.join(STATIC_DIRECTORY, name);
return fsWriteFile(destinationPath, data)
.then(() => fsChmod(destinationPath, 0o755)) // https://nodejs.org/api/fs.html#fs_fs_chmod_path_mode_callback
.then(() => destinationPath);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment