Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL with $ does not work on WSL 2 #202

Open
CryogenicPlanet opened this issue Oct 22, 2020 · 2 comments
Open

URL with $ does not work on WSL 2 #202

CryogenicPlanet opened this issue Oct 22, 2020 · 2 comments

Comments

@CryogenicPlanet
Copy link

CryogenicPlanet commented Oct 22, 2020

Bug: The opened URL is randomly missing ${word}

Found bug when using amplify-cli aws-amplify/amplify-cli#5664

Enviorment:

  • WSL 2
  • "open" : "^7.3.0",

Code snippet:

const open = require("open");

const deepLinkURL = "https://localhost/users$new?step=abc"

open(deepLinkURL, { wait: false }).catch(() => { });

image

Related to #170 and #171

@CryogenicPlanet CryogenicPlanet changed the title URL with $ and ? don't work on WSL 2 URL with $ does not work on WSL 2 Oct 22, 2020
@sindresorhus
Copy link
Owner

// @Pytal @tim-stasse

CryogenicPlanet added a commit to CryogenicPlanet/open that referenced this issue Oct 22, 2020
@CryogenicPlanet
Copy link
Author

Looking at #170 I think I found a solution

I think a change here from this to

open/index.js

Lines 104 to 106 in f3748e4

} else {
encodedArguments.push(`"\`"${target}\`""`);
}

 } else { 
 	encodedArguments.push(`'${target}'`); 
 } 

will solve the escaping problems on WSL, I can create a PR for the same.

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

Successfully merging a pull request may close this issue.

2 participants