Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(installer): hdiutil output should be a string #423

Merged
merged 1 commit into from
Jan 29, 2018
Merged

Conversation

malept
Copy link
Member

@malept malept commented Jan 26, 2018

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:

cross-spawn-promise returns stdout as a buffer.

@zeke could you see if this fixes your problem? I'm kind of flying blind since I don't have a Mac.

Fixes #410.

@zeke
Copy link

zeke commented Jan 26, 2018

@malept thanks for working on this. I'm seeing a different error when attempting to install from a build of this branch:

~/git/electron-userland/electron-forge fix-dmg-install
$ node dist/electron-forge.js install SingletonIT/MUNO-release

✔ Checking your system
✔ Searching for Releases
Found latest release: v0.4.1
? Multiple potential assets found, please choose one from the list below: Muno-0.4.1.dmg
Downloading SingletonIT-MUNO-release-v0.4.1-Muno-0.4.1.dmg
[============================================>] 100.0% of 58.16 MB (202.47 kB/s)
✖ Installing Application

An unhandled error has occurred inside Forge:
A value [object Promise] was yielded that could not be treated as a promise

    See http://goo.gl/MqrFmX

From coroutine:
    at Promise.coroutine (/Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/generators.js:194:17)
    at exports.mountImage (/Users/z/git/electron-userland/electron-forge/dist/util/hdiutil.js:75:39)
    at Object.<anonymous> (/Users/z/git/electron-userland/electron-forge/dist/util/hdiutil.js:90:3)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
TypeError: A value [object Promise] was yielded that could not be treated as a promise

    See http://goo.gl/MqrFmX

From coroutine:
    at Promise.coroutine (/Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/generators.js:194:17)
    at exports.mountImage (/Users/z/git/electron-userland/electron-forge/dist/util/hdiutil.js:75:39)
    at Object.<anonymous> (/Users/z/git/electron-userland/electron-forge/dist/util/hdiutil.js:90:3)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at PromiseSpawn._continue (/Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/generators.js:159:21)
    at PromiseSpawn._promiseFulfilled (/Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/generators.js:99:10)
    at /Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/generators.js:201:15
    at mountImage (/Users/z/git/electron-userland/electron-forge/dist/util/hdiutil.js:88:18)
    at Object.<anonymous> (/Users/z/git/electron-userland/electron-forge/dist/installers/darwin/dmg.js:37:51)
    at Generator.next (<anonymous>)
    at Generator.tryCatcher (/Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/util.js:16:23)
    at PromiseSpawn._promiseFulfilled (/Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/generators.js:97:49)
    at Promise._settlePromise (/Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/promise.js:574:26)
    at Promise._settlePromise0 (/Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/Users/z/git/electron-userland/electron-forge/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)

@zeke
Copy link

zeke commented Jan 26, 2018

Tried it with a few different repos that have DMGs and got the same result.

@malept
Copy link
Member Author

malept commented Jan 26, 2018

Ah, I think I see the problem:

https://github.com/electron-userland/electron-forge/blob/fa0e3ea16bc73fc789689a96f894b9120c737e68/src/util/hdiutil.js#L29

The await spawnPromise(...) needs parentheses before the .toString(). I'll fix it tonight.

@malept
Copy link
Member Author

malept commented Jan 27, 2018

@zeke I should have fixed the latest error, have another go at it when you have a chance.

cross-spawn-promise returns stdout as a buffer.

ISSUES CLOSED: #410
Copy link

@zeke zeke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works!

@malept malept merged commit e511206 into master Jan 29, 2018
@malept malept deleted the fix-dmg-install branch January 29, 2018 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

output.split is not a function
3 participants