fix(build): support tilde expansion on windows (#563)

Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
This commit is contained in:
hiepxanh 2021-07-13 17:02:09 +07:00 committed by GitHub
parent 16ff6e1b2f
commit 68a302e9d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -20,6 +20,7 @@
var path = require('path'); var path = require('path');
var fs = require('fs'); var fs = require('fs');
var nopt = require('nopt'); var nopt = require('nopt');
const untildify = require('untildify');
var Adb = require('./Adb'); var Adb = require('./Adb');
@ -82,9 +83,7 @@ function parseOpts (options, resolvedTarget, projectRoot) {
if (config.android && config.android[ret.buildType]) { if (config.android && config.android[ret.buildType]) {
var androidInfo = config.android[ret.buildType]; var androidInfo = config.android[ret.buildType];
if (androidInfo.keystore && !packageArgs.keystore) { if (androidInfo.keystore && !packageArgs.keystore) {
if (androidInfo.keystore.substr(0, 1) === '~') { androidInfo.keystore = untildify(androidInfo.keystore);
androidInfo.keystore = process.env.HOME + androidInfo.keystore.substr(1);
}
packageArgs.keystore = path.resolve(path.dirname(buildConfig), androidInfo.keystore); packageArgs.keystore = path.resolve(path.dirname(buildConfig), androidInfo.keystore);
events.emit('log', 'Reading the keystore from: ' + packageArgs.keystore); events.emit('log', 'Reading the keystore from: ' + packageArgs.keystore);
} }

5
package-lock.json generated
View File

@ -3202,6 +3202,11 @@
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ=="
}, },
"untildify": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz",
"integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw=="
},
"uri-js": { "uri-js": {
"version": "4.4.1", "version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",

View File

@ -31,6 +31,7 @@
"nopt": "^5.0.0", "nopt": "^5.0.0",
"properties-parser": "^0.3.1", "properties-parser": "^0.3.1",
"semver": "^7.3.5", "semver": "^7.3.5",
"untildify": "^4.0.0",
"which": "^2.0.2" "which": "^2.0.2"
}, },
"devDependencies": { "devDependencies": {