atom-community / atom-community/atom-script

Bug in retrieving the PATH

Open
#1,915 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
730
Forks
264
PR merge metrics
No merged PRs in 30d

Description

Script is not letting me run NodeJS but everything is normal when I run it in the command prompt. The error I get is "the system cannot find the file specified".

I've looked for help already and I'm pretty sure it's a bug in the pathway, see [this thread](https://discuss.atom.io/t/the-system-cannot-find-the-file-specified-finished-in-1-171s/53149/5):

> DamnedScholar
> Mar '18
> Okay, I know what’s happening. script is sending the instruction to your OS as
> gcc C:\Path\To The\File
> when it should be
> gcc "C:\Path\To The\File"
> so gcc thinks that the path is actually C:\Path\To (spaces in shell commands separate the arguments). This is a bug in the package.

I've tried other script-running packages for NodeJS and they work fine.

Contributor guide

Open the contributing guide

Research direction

Reproduce running a NodeJS script from Atom on Windows when the file path contains spaces, then compare it with the command prompt behavior described in the issue. Inspect how the package constructs the command sent to the operating system; done means NodeJS scripts run successfully with spaced paths as well as ordinary paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.