mirror of
https://github.com/r0adkll/sign-android-release
synced 2026-10-01 00:51:36 +00:00
bump jest and make tests pass
This commit is contained in:
1 parent
d28dc26fa3
commit
4f58d166b7
5769 files changed
+856618
-394571
No files matched your search
+10
-10
@@ -1,19 +1,19 @@
|
||||
'use strict';
|
||||
var shebangRegex = require('shebang-regex');
|
||||
const shebangRegex = require('shebang-regex');
|
||||
|
||||
module.exports = function (str) {
|
||||
var match = str.match(shebangRegex);
|
||||
module.exports = (string = '') => {
|
||||
const match = string.match(shebangRegex);
|
||||
|
||||
if (!match) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var arr = match[0].replace(/#! ?/, '').split(' ');
|
||||
var bin = arr[0].split('/').pop();
|
||||
var arg = arr[1];
|
||||
const [path, argument] = match[0].replace(/#! ?/, '').split(' ');
|
||||
const binary = path.split('/').pop();
|
||||
|
||||
return (bin === 'env' ?
|
||||
arg :
|
||||
bin + (arg ? ' ' + arg : '')
|
||||
);
|
||||
if (binary === 'env') {
|
||||
return argument;
|
||||
}
|
||||
|
||||
return argument ? `${binary} ${argument}` : binary;
|
||||
};
|
||||
Reference in new issue
Block a user