mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Deal with spaces, paths and other 7z/cmd issues with signed extraction
This commit is contained in:
@@ -56,11 +56,10 @@ module.exports = function (packagedAppPath, codeSign) {
|
||||
if (signing) {
|
||||
for (let nupkgPath of glob.sync(`${CONFIG.buildOutputPath}/*-full.nupkg`)) {
|
||||
if (nupkgPath.includes(CONFIG.appMetadata.version)) {
|
||||
nupkgPath = path.resolve(nupkgPath) // Switch from forward-slash notation
|
||||
console.log(`Extracting signed executables from ${nupkgPath} for use in portable zip`)
|
||||
const outPath = path.dirname(nupkgPath)
|
||||
const appPath = path.relative(outPath, packagedAppPath)
|
||||
spawnSync('7z.exe', ['e', path.relative(outPath, nupkgPath), 'lib\\net45\\*.exe', '-aoa', `-o${appPath}`], { cwd:outPath })
|
||||
spawnSync(process.env.COMSPEC, ['/c', `move /y ${path.join(appPath, 'squirrel.exe')} ${path.join(appPath, 'update.exe')}`], { cwd:outPath })
|
||||
spawnSync('7z.exe', ['e', nupkgPath, 'lib\\net45\\*.exe', '-aoa', `-o${packagedAppPath}`])
|
||||
spawnSync(process.env.COMSPEC, ['/c', 'move', '/y', path.join(packagedAppPath, 'squirrel.exe'), path.join(packagedAppPath, 'update.exe')])
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user