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

Attempt to work with different quoting styles that worked in previous client #141

Closed
thigg opened this Issue Mar 3, 2015 · 15 comments

Comments

Projects
None yet
2 participants
@thigg

thigg commented Mar 3, 2015

The currently working method to use the current path is "%cd".
At least here:
https://github.com/chocolatey/choco/wiki/CreatePackages#testing-your-package
The documentation suggestes '%cd%'

*From Rob: * Some of the documentation was plain wrong and leaned towards cmd.exe - single tick marks have probably never worked in powershell.exe that I'm aware of. That's why the '"stuff"' (apostrophe followed by a double quote) in some parts of the documentation.

@ghost

This comment has been minimized.

ghost commented Mar 3, 2015

I almost went out the door with scripts that are now broken due to this.
Was the breaking of backwards compatibility on purpose? It worked BEFORE 0.9.9

This isn't just when referencing the current location, but when specifying ANY source.

@thigg

This comment has been minimized.

thigg commented Mar 3, 2015

I think this was not intentional, as far as I understand this is just the way Windows deals with cmd inputs. It seems to be different if the target is a posh-script

@ferventcoder

This comment has been minimized.

Member

ferventcoder commented Mar 3, 2015

@ryanroundhouse this is a breaking change, not necessarily intentional. What did you have before? We can attempt to bring about something that will allow this to work with new choco.

@ferventcoder ferventcoder changed the title from Documentation: reference to current location in cmd with "%cd%" to Attempt to work with updates - Reference to current location in cmd with "%cd%" Mar 3, 2015

@ferventcoder

This comment has been minimized.

Member

ferventcoder commented Mar 3, 2015

The problem here is we removed a bunch of layers. Before it was shim -> cmd -> powershell (jumping through hoops to ensure quotes made it all the way down). Now it is just shim -> exe.

@ghost

This comment has been minimized.

ghost commented Mar 3, 2015

I was using the same thing as thigg. The documentation he linked to suggested using apostrophes around paths (ie: 'c:\program files (x86)\path\to local\store;http://chocolatey.org/api/v2/').

It now complains that the package cannot be found and it is checking:
Source(s): "'c:\program"

@thigg

This comment has been minimized.

thigg commented Mar 3, 2015

Would be nice to be backward compatible, also for scripts which are using chocolatey.

@ferventcoder

This comment has been minimized.

Member

ferventcoder commented Mar 3, 2015

agreed. Adjusted. this should be 0.9.9.1

@thigg

This comment has been minimized.

thigg commented Mar 3, 2015

So it should allow "test" 'test' and '"test'" (single, double and combined)?

@ferventcoder

This comment has been minimized.

Member

ferventcoder commented Mar 3, 2015

Also keep in mind that we can only do so much here. There is a difference between how powershell handles and how cmd handles it.

@ferventcoder

This comment has been minimized.

Member

ferventcoder commented Mar 3, 2015

In some places we've already tried to cover that - powershell may have never handled single quotes.

@thigg

This comment has been minimized.

thigg commented Mar 3, 2015

But if the target is an exe file, we should be able to do the whole formatting as we like it, right?

@ferventcoder ferventcoder added this to the 0.9.9.1 milestone Mar 3, 2015

@ferventcoder

This comment has been minimized.

Member

ferventcoder commented Mar 3, 2015

It should work as much the same way as before - I think the single tick marks apostrophes would may have only worked on cmd.exe - powershell would have stripped it right off.

@ferventcoder ferventcoder changed the title from Attempt to work with updates - Reference to current location in cmd with "%cd%" to Attempt to work with different quoting styles that worked in previous version Mar 3, 2015

@ferventcoder ferventcoder changed the title from Attempt to work with different quoting styles that worked in previous version to Attempt to work with different quoting styles that worked in previous client. Mar 3, 2015

@ferventcoder ferventcoder changed the title from Attempt to work with different quoting styles that worked in previous client. to Attempt to work with different quoting styles that worked in previous client Mar 3, 2015

@ghost

This comment has been minimized.

ghost commented Mar 3, 2015

I was using apostrophe, not a tick.

On Tue, Mar 3, 2015 at 1:49 PM, Rob Reynolds notifications@github.com
wrote:

It should work as much the same way as before - I think the single tick
marks would have only worked on cmd.exe - powershell would have stripped it
right off.


Reply to this email directly or view it on GitHub
#141 (comment).

@ferventcoder

This comment has been minimized.

Member

ferventcoder commented Mar 3, 2015

I was using apostrophe, not a tick.

Yeah sorry, I use those terms interchangeably (and technically incorrectly) meaning apostrophe. Backtick being something different.

@ferventcoder ferventcoder modified the milestones: 0.9.9.1, 0.9.9.2 Mar 3, 2015

@ferventcoder ferventcoder added 3 - Done and removed 0 - Backlog labels Mar 6, 2015

ferventcoder added a commit that referenced this issue Mar 6, 2015

(GH-141) Handle option w/surrounding apostrophes
When command has an option passed in with surrounding apostrophes, e.g.
`--some-param='some value'`, remove the apostrophes from the value.

ferventcoder added a commit that referenced this issue Mar 6, 2015

Merge branch 'stable'
* stable:
  (GH-153) Upgrade -r should always return a value
  (GH-141) Handle option w/surrounding apostrophes
  (maint) Correcting typos

@ferventcoder ferventcoder self-assigned this Mar 6, 2015

@ferventcoder

This comment has been minimized.

Member

ferventcoder commented Mar 7, 2015

So chocolatey will properly handle apostrophes again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment