diff --git a/.all-contributorsrc b/.all-contributorsrc
index 7e2837b..b2e11f5 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -154,6 +154,15 @@
"example",
"test"
]
+ },
+ {
+ "login": "NicoZelaya",
+ "name": "D. NicolΓ‘s Lopez Zelaya",
+ "avatar_url": "https://avatars0.githubusercontent.com/u/5522668?v=4",
+ "profile": "https://github.com/NicoZelaya",
+ "contributions": [
+ "code"
+ ]
}
]
}
diff --git a/README.md b/README.md
index 38ac618..9033832 100755
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ Run scripts that set and use environment variables across platforms
[![downloads][downloads-badge]][npm-stat]
[![MIT License][license-badge]][LICENSE]
-[![All Contributors](https://img.shields.io/badge/all_contributors-14-orange.svg?style=flat-square)](#contributors)
+[![All Contributors](https://img.shields.io/badge/all_contributors-15-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome][prs-badge]][prs]
[![Donate][donate-badge]][donate]
[![Code of Conduct][coc-badge]][coc]
@@ -153,9 +153,11 @@ much easier for Windows users.
Thanks goes to these people ([emoji key][emojis]):
-| [
Kent C. Dodds](https://kentcdodds.com)
[π»](https://github.com/kentcdodds/cross-env/commits?author=kentcdodds "Code") [π](https://github.com/kentcdodds/cross-env/commits?author=kentcdodds "Documentation") [π](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=kentcdodds "Tests") | [
Ya Zhuang ](https://zhuangya.me)
[π](#plugin-zhuangya "Plugin/utility libraries") [π](https://github.com/kentcdodds/cross-env/commits?author=zhuangya "Documentation") | [
James Harris](https://wopian.me)
[π](https://github.com/kentcdodds/cross-env/commits?author=wopian "Documentation") | [
compumike08](https://github.com/compumike08)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Acompumike08 "Bug reports") [π](https://github.com/kentcdodds/cross-env/commits?author=compumike08 "Documentation") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=compumike08 "Tests") | [
Daniel RodrΓguez Rivero](https://github.com/danielo515)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Adanielo515 "Bug reports") [π»](https://github.com/kentcdodds/cross-env/commits?author=danielo515 "Code") [π](https://github.com/kentcdodds/cross-env/commits?author=danielo515 "Documentation") | [
Jonas Keinholz](https://github.com/inyono)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Ainyono "Bug reports") [π»](https://github.com/kentcdodds/cross-env/commits?author=inyono "Code") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=inyono "Tests") | [
Hugo Wood](https://github.com/hgwood)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Ahgwood "Bug reports") [π»](https://github.com/kentcdodds/cross-env/commits?author=hgwood "Code") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=hgwood "Tests") |
+
+| [
Kent C. Dodds](https://kentcdodds.com)
[π»](https://github.com/kentcdodds/cross-env/commits?author=kentcdodds "Code") [π](https://github.com/kentcdodds/cross-env/commits?author=kentcdodds "Documentation") [π](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=kentcdodds "Tests") | [
Ya Zhuang ](https://zhuangya.me)
[π](#plugin-zhuangya "Plugin/utility libraries") [π](https://github.com/kentcdodds/cross-env/commits?author=zhuangya "Documentation") | [
James Harris](https://wopian.me)
[π](https://github.com/kentcdodds/cross-env/commits?author=wopian "Documentation") | [
compumike08](https://github.com/compumike08)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Acompumike08 "Bug reports") [π](https://github.com/kentcdodds/cross-env/commits?author=compumike08 "Documentation") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=compumike08 "Tests") | [
Daniel RodrΓguez Rivero](https://github.com/danielo515)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Adanielo515 "Bug reports") [π»](https://github.com/kentcdodds/cross-env/commits?author=danielo515 "Code") [π](https://github.com/kentcdodds/cross-env/commits?author=danielo515 "Documentation") | [
Jonas Keinholz](https://github.com/inyono)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Ainyono "Bug reports") [π»](https://github.com/kentcdodds/cross-env/commits?author=inyono "Code") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=inyono "Tests") | [
Hugo Wood](https://github.com/hgwood)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Ahgwood "Bug reports") [π»](https://github.com/kentcdodds/cross-env/commits?author=hgwood "Code") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=hgwood "Tests") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
-| [
Thiebaud Thomas](https://github.com/thomasthiebaud)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Athomasthiebaud "Bug reports") [π»](https://github.com/kentcdodds/cross-env/commits?author=thomasthiebaud "Code") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=thomasthiebaud "Tests") | [
Daniel Rey LΓ³pez](https://daniel.blog)
[π»](https://github.com/kentcdodds/cross-env/commits?author=DanReyLop "Code") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=DanReyLop "Tests") | [
Amila Welihinda](http://amilajack.com)
[π](#infra-amilajack "Infrastructure (Hosting, Build-Tools, etc)") | [
Paul Betts](https://twitter.com/paulcbetts)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Apaulcbetts "Bug reports") [π»](https://github.com/kentcdodds/cross-env/commits?author=paulcbetts "Code") | [
Turner Hayes](https://github.com/turnerhayes)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Aturnerhayes "Bug reports") [π»](https://github.com/kentcdodds/cross-env/commits?author=turnerhayes "Code") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=turnerhayes "Tests") | [
Suhas Karanth](https://github.com/sudo-suhas)
[π»](https://github.com/kentcdodds/cross-env/commits?author=sudo-suhas "Code") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=sudo-suhas "Tests") | [
Sven](https://github.com/sventschui)
[π»](https://github.com/kentcdodds/cross-env/commits?author=sventschui "Code") [π](https://github.com/kentcdodds/cross-env/commits?author=sventschui "Documentation") [π‘](#example-sventschui "Examples") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=sventschui "Tests") |
+| [
Thiebaud Thomas](https://github.com/thomasthiebaud)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Athomasthiebaud "Bug reports") [π»](https://github.com/kentcdodds/cross-env/commits?author=thomasthiebaud "Code") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=thomasthiebaud "Tests") | [
Daniel Rey LΓ³pez](https://daniel.blog)
[π»](https://github.com/kentcdodds/cross-env/commits?author=DanReyLop "Code") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=DanReyLop "Tests") | [
Amila Welihinda](http://amilajack.com)
[π](#infra-amilajack "Infrastructure (Hosting, Build-Tools, etc)") | [
Paul Betts](https://twitter.com/paulcbetts)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Apaulcbetts "Bug reports") [π»](https://github.com/kentcdodds/cross-env/commits?author=paulcbetts "Code") | [
Turner Hayes](https://github.com/turnerhayes)
[π](https://github.com/kentcdodds/cross-env/issues?q=author%3Aturnerhayes "Bug reports") [π»](https://github.com/kentcdodds/cross-env/commits?author=turnerhayes "Code") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=turnerhayes "Tests") | [
Suhas Karanth](https://github.com/sudo-suhas)
[π»](https://github.com/kentcdodds/cross-env/commits?author=sudo-suhas "Code") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=sudo-suhas "Tests") | [
Sven](https://github.com/sventschui)
[π»](https://github.com/kentcdodds/cross-env/commits?author=sventschui "Code") [π](https://github.com/kentcdodds/cross-env/commits?author=sventschui "Documentation") [π‘](#example-sventschui "Examples") [β οΈ](https://github.com/kentcdodds/cross-env/commits?author=sventschui "Tests") |
+| [
D. NicolΓ‘s Lopez Zelaya](https://github.com/NicoZelaya)
[π»](https://github.com/kentcdodds/cross-env/commits?author=NicoZelaya "Code") |
This project follows the [all-contributors][all-contributors] specification. Contributions of any kind welcome!
diff --git a/src/index.js b/src/index.js
index edad2d9..45ad1a3 100644
--- a/src/index.js
+++ b/src/index.js
@@ -52,18 +52,19 @@ function parseCommand(args) {
} else {
// No more env setters, the rest of the line must be the command and args
let cStart = []
- cStart = args.slice(i)
+ cStart = args
+ .slice(i)
// Regex:
// match "\'" or "'"
// or match "\" if followed by [$"\] (lookahead)
- .map((a) => {
- const re = new RegExp(/(\\)?'|([\\])(?=[$"\\])/, 'g')
- // Eliminate all matches except for "\'" => "'"
- return a.replace(re, (m) => {
- if(m === "\\'") return "'"
- return ""
+ .map(a => {
+ const re = /(\\)?'|([\\])(?=[$"\\])/g
+ // Eliminate all matches except for "\'" => "'"
+ return a.replace(re, m => {
+ if (m === "\\'") return "'"
+ return ''
+ })
})
- })
command = cStart[0]
commandArgs = cStart.slice(1)
break