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

[WSL] No such file or directory when setup environment #7191

Closed
1 of 2 tasks
caiqichang opened this issue Jul 16, 2021 · 1 comment
Closed
1 of 2 tasks

[WSL] No such file or directory when setup environment #7191

caiqichang opened this issue Jul 16, 2021 · 1 comment

Comments

@caiqichang
Copy link

Windows Build Number

Microsoft Windows [Version 10.0.19041.1110]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

4.4.0

Distro Version

Ubuntu 18.04

Other Software

No response

Repro Steps

  1. append new line export NODEJS="/mnt/d/wsl/node" to the end of ~/.bashrc
  2. start wsl and appear: -bash: export NODEJS=/mnt/d/wsl/node: No such file or directory
  3. but is avaliable to access this directory in wsl, see the screen capture
    QQ截图20210717025459

Expected Behavior

use file (outer of wsl) as environment variables of wsl

Actual Behavior

fail to setup

Diagnostic Logs

No response

@caiqichang caiqichang changed the title [WSL] [WSL] No such file or directory when setup environment Jul 16, 2021
@caiqichang
Copy link
Author

i restore the ~/.bashrc and redo these again, and it works!
i can make sure that i alway use LF instead of CRLF in ~/.bashrc, maybe it is due to \n and \r\n ?

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

No branches or pull requests

1 participant