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

Do downcase on Windows environment key_name too #1754

Closed
wants to merge 1 commit into from
Closed

Do downcase on Windows environment key_name too #1754

wants to merge 1 commit into from

Conversation

alex-slynko
Copy link
Contributor

Issue breaks windows_path

@sersut
Copy link
Contributor

sersut commented Aug 5, 2014

Hrmm... Do we need to downcase all the time or try to find the key name that already is existing on the node? I.e. what happens when the path env variable is set as Path on the box?

/cc: @adamedx

@sersut sersut added Bug labels Aug 6, 2014
@btm
Copy link
Contributor

btm commented Aug 6, 2014

This probably fixes chef-boneyard/windows#105. We definitely need a test added here. /cc @adamedx

@adamedx
Copy link
Contributor

adamedx commented Aug 6, 2014

Basic issue is that previously we did direct WQL queries via the ruby-wmi gem, and wql by default is case insensitive. With the switch to wmi-lite to do this without a WQL query, we need to emulate case insensitivity, which we are not doing. This fix addresses the issue. Another fix would be to simply use the 'query' method instead of instances_of, and allow wql to process the query.

Here is an example which shows what's broken:

env "envBUG" do
  action :delete
end

env "envbug" do
  action :create
  value 'stuff'
end

# This will crash, since 'envBUG' doesn't exist 
# if you do a case sensitive comparison.
env "envBUG" do
  action :modify
  value 'stuff2'
end

@btm
Copy link
Contributor

btm commented Aug 7, 2014

Thanks guys. This is superseded by #1774.

@btm btm closed this Aug 7, 2014
@alex-slynko alex-slynko deleted the patch-1 branch August 8, 2014 10:10
@thommay thommay added Type: Bug Does not work as expected. and removed Bug labels Jan 25, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Windows Type: Bug Does not work as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants