Skip to content

Commit

Permalink
fix: snap - can't push to snapcraft anymore because of execstack
Browse files Browse the repository at this point in the history
Close #2608
  • Loading branch information
develar committed Feb 20, 2018
1 parent 58933e0 commit 24f2565
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/electron-builder-lib/src/linuxPackager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Arch, AsyncTaskManager, log } from "builder-util"
import { Arch, AsyncTaskManager, log, executeAppBuilder } from "builder-util"
import { rename } from "fs-extra-p"
import * as path from "path"
import sanitizeFileName from "sanitize-filename"
Expand Down Expand Up @@ -81,8 +81,15 @@ export class LinuxPackager extends PlatformPackager<LinuxConfiguration> {
}
}

protected postInitApp(packContext: AfterPackContext): Promise<any> {
return rename(path.join(packContext.appOutDir, this.electronDistExecutableName), path.join(packContext.appOutDir, this.executableName))
protected async postInitApp(packContext: AfterPackContext): Promise<void> {
const executable = path.join(packContext.appOutDir, this.executableName)
await rename(path.join(packContext.appOutDir, this.electronDistExecutableName), executable)
try {
await executeAppBuilder(["clear-exec-stack", "--input", executable])
}
catch (e) {
log.debug({error: e}, "cannot clear exec stack")
}
}
}

Expand Down

0 comments on commit 24f2565

Please sign in to comment.