Skip to content

Commit

Permalink
Moved hostArch() earlier in validateListFromOptions()
Browse files Browse the repository at this point in the history
This PR is in response to atom/atom#15431.  When I tried to build Atom
on my Chromebook running Arch Linux ARM, the automatic trigger detecting
armv7l was not running because a value already existed for the arch.

This change moves the hostArch() function before the list assignment to
catch this case.  When I run this code on my Chromebook, the packaging
code appears to succeed.
  • Loading branch information
mathuin committed Dec 12, 2017
1 parent e65ab6c commit 87b5e50
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions targets.js
Expand Up @@ -102,13 +102,14 @@ module.exports = {
validateListFromOptions: function validateListFromOptions (opts, name) {
if (opts.all) return Array.from(supported[name].values())

let list = opts[name]
let list
if (name === 'arch') {
list = hostArch()
} else {
list = opts[name]
}
if (!list) {
if (name === 'arch') {
list = hostArch()
} else {
list = process[name]
}
list = process[name]
} else if (list === 'all') {
return Array.from(supported[name].values())
}
Expand All @@ -128,7 +129,6 @@ module.exports = {
return unsupportedListOption(name, value, supported[name])
}
}

return list
}
}

0 comments on commit 87b5e50

Please sign in to comment.