Skip to content
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.

fix(#127): Handle relative path in cmd on windows #130

Merged
merged 3 commits into from Aug 1, 2017

Conversation

sudo-suhas
Copy link
Contributor

This uses path.normalize in commandConvert to handle relative paths like ./cmd.bat on windows.
Also updates the test converts embedded unix-style env variables usage for windows to use path.normalize so that it does not fail on windows.

I have added myself to contributors.

Closes #127

@codecov
Copy link

codecov bot commented Aug 1, 2017

Codecov Report

Merging #130 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #130   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines          50     50           
=====================================
  Hits           50     50
Impacted Files Coverage Δ
src/command.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f83a163...1344bcc. Read the comment docs.

Copy link
Owner

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great! Thanks!

@kentcdodds kentcdodds merged commit 487241d into kentcdodds:master Aug 1, 2017
@sudo-suhas sudo-suhas deleted the fix/relativ-path-win branch August 1, 2017 15:54
@weizhenye
Copy link

It seems this PR breaks URL.
My script:
cross-env NODE_ENV=development webpack-dev-server --env.api="https://api.example.com"

path.normalize('https://api.example.com'); // -> 'https:\\api.example.com'

@sudo-suhas
Copy link
Contributor Author

@weizhenye I think you are right. I am working on a fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants