Skip to content

New outline queries produce invalid $ZED_SYMBOL for runnables #92

@vitallium

Description

@vitallium

Hey @kaspth and @andyw8 👋

is this working for you folks? I've replaced my task setup from use line number to use -n pattern like you folks suggested.

[
  {
    "label": "test $ZED_RELATIVE_FILE -n /$ZED_SYMBOL/",
    "command": "bin/rails test $ZED_RELATIVE_FILE -n /$ZED_SYMBOL/",
    "tags": ["ruby-test"]
  }
]

this works when I run the class test BUT running a single test case it adds a space between / and the " character from $ZED_SYMBOL

⏵ Task `test test/models/cnae_test.rb -n / "formats a CNAE code"/` finished with non-zero error code: 1
⏵ Command: /bin/zsh -i -c 'bin/rails test test/models/cnae_test.rb -n / "formats a CNAE code"/'

see that it is trying to run / "formats a CNAE code"/' instead of `/"formats a CNAE code"/'? this makes my command to fails:

<internal:dir>:411:in `glob': Operation not permitted - //Library/Application Support/com.apple.TCC (Errno::EPERM)
	from /Users/cadu/.local/share/mise/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rake-13.2.1/lib/rake/file_list.rb:408:in `glob'
	from /Users/cadu/.local/share/mise/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rake-13.2.1/lib/rake/file_list.rb:351:in `add_matching'
	from /Users/cadu/.local/share/mise/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rake-13.2.1/lib/rake/file_list.rb:223:in `resolve_add'
	from /Users/cadu/.local/share/mise/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rake-13.2.1/lib/rake/file_list.rb:213:in `block in resolve'
	from /Users/cadu/.local/share/mise/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rake-13.2.1/lib/rake/file_list.rb:213:in `each'
	from /Users/cadu/.local/share/mise/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rake-13.2.1/lib/rake/file_list.rb:213:in `resolve'
	from /Users/cadu/.local/share/mise/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rake-13.2.1/lib/rake/file_list.rb:177:in `to_a'

when running the class test, it does not prepend the space character:

⏵ Task `test test/models/cnae_test.rb -n /CnaeTest/` finished successfully
⏵ Command: /bin/zsh -i -c 'bin/rails test test/models/cnae_test.rb -n /CnaeTest/'

this is on Zed Preview 0.186.5. Are you folks facing this problem as well?

Originally posted by @duduribeiro in #56

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions