Skip to content

Commit

Permalink
fix(build): support tilde expansion on windows (apache#563)
Browse files Browse the repository at this point in the history
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
  • Loading branch information
2 people authored and wedgberto committed May 17, 2022
1 parent 8994929 commit 37ceaa1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
var path = require('path');
var fs = require('fs');
var nopt = require('nopt');
const untildify = require('untildify');

var Adb = require('./Adb');

Expand Down Expand Up @@ -82,9 +83,7 @@ function parseOpts (options, resolvedTarget, projectRoot) {
if (config.android && config.android[ret.buildType]) {
var androidInfo = config.android[ret.buildType];
if (androidInfo.keystore && !packageArgs.keystore) {
if (androidInfo.keystore.substr(0, 1) === '~') {
androidInfo.keystore = process.env.HOME + androidInfo.keystore.substr(1);
}
androidInfo.keystore = untildify(androidInfo.keystore);
packageArgs.keystore = path.resolve(path.dirname(buildConfig), androidInfo.keystore);
events.emit('log', 'Reading the keystore from: ' + packageArgs.keystore);
}
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"nopt": "^5.0.0",
"properties-parser": "^0.3.1",
"semver": "^7.3.5",
"untildify": "^4.0.0",
"which": "^2.0.2"
},
"devDependencies": {
Expand Down

0 comments on commit 37ceaa1

Please sign in to comment.