Skip to content

Commit

Permalink
Merge pull request #1326 from HomerSp/workaround-issue-upgrade
Browse files Browse the repository at this point in the history
Workaround issues when upgrading from v1.5.9 or older
  • Loading branch information
HomerSp committed Apr 12, 2021
2 parents 047f976 + 0e8a3c4 commit 8f397ab
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions gulpfile.coffee
Expand Up @@ -18,6 +18,7 @@ filter = require 'gulp-filter'
Q = require 'q'
Stream = require 'stream'
spawn = require('child_process').spawn
glob = require('glob')

#
#
Expand Down Expand Up @@ -323,6 +324,16 @@ deploy = (platform, arch, cb) ->
console.error(error)
.then (appPaths) ->
if appPaths?.length > 0
# Work around issue when upgrading from an older version that causes
# it to use the old app directory, rather than the new app.asar file.
# This is due to electron checking for the app dir first, then the asar.
# See: https://github.com/electron/electron/blob/master/lib/browser/init.ts#L84
files = glob.sync "#{appPaths[0]}/**/app.asar", {nodir: true}
if files.length > 0
resPath = path.dirname files[0]
fs.mkdirSync "#{resPath}/app", {recursive: true}
fs.writeFileSync "#{resPath}/app/package.json", ""

if process.env.NO_ZIP
cb()
return deferred.resolve()
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "yakyak",
"version": "1.5.11.1",
"version": "1.5.11.2",
"description": "Chat client for Google Hangouts",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit 8f397ab

Please sign in to comment.