Skip to content

Fix ctags generate problem #489

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

Merged
merged 2 commits into from
Jan 4, 2018
Merged

Conversation

graycarl
Copy link

Fix fail to generate ctags when there is a space in the path. like #44 #146.

We don't need to handle space in the path when the path is passed to child_process.spawn as 'args' (not as the command).

Here is some sample. If we create a file in the path /tmp/Test Dir/file, then run this code:

const { spawn } = require('child_process');
const cat1 = spawn('cat', ['/tmp/Test Dir/file']);
const cat2 = spawn('cat', ['"/tmp/Test Dir/file"']);

cat1.stdout.on('data', (data) => {
	console.log(`stdout from cat1: ${data}`);
});

cat1.stderr.on('data', (data) => {
	console.log(`stderr from cat1: ${data}`);
});

cat2.stdout.on('data', (data) => {
	console.log(`stdout from cat2: ${data}`);
});

cat2.stderr.on('data', (data) => {
	console.log(`stderr from cat2: ${data}`);
});

We'll get some output like this:

stdout from cat1: Some text here.

stderr from cat2: cat: "/tmp/Test Dir/file": No such file or directory

@brettcannon
Copy link
Member

I just wanted to say thanks for the PR, @graycarl ! Most of us just got back from vacation, but we will review your PR at some point.

@codecov
Copy link

codecov bot commented Jan 4, 2018

Codecov Report

Merging #489 into master will increase coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #489      +/-   ##
==========================================
+ Coverage   56.44%   56.46%   +0.01%     
==========================================
  Files         212      212              
  Lines        9970     9968       -2     
  Branches     1756     1754       -2     
==========================================
  Hits         5628     5628              
+ Misses       4338     4336       -2     
  Partials        4        4
Impacted Files Coverage Δ
src/client/workspaceSymbols/generator.ts 35.84% <0%> (+1.3%) ⬆️

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 8f97908...4eb8c06. Read the comment docs.

@DonJayamanne DonJayamanne merged commit 53b954f into microsoft:master Jan 4, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
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.

3 participants