Skip to content

chef-cli cannot update policyfile when the path contains spaces #214

@hunter86bg

Description

@hunter86bg

Version:

Chef Workstation version: 22.7.1006
Chef Infra Client version: 17.10.0
Chef InSpec version: 4.56.20
Chef CLI version: 5.6.1
Chef Habitat version: 1.6.420
Test Kitchen version: 3.3.1
Cookstyle version: 7.32.1

Environment:

OS: Win 10 (Build: 19044)
Terminal: Windows Terminal with profile from git for windows

Scenario:

Update a policy file

Steps to Reproduce:

  1. Setup Onedrive with spaces in the name
  2. Create a directory in it
  3. Update the policyfile

Expected Result:

The path should always be escaped and the policyfle should be created/updated.

Actual Result:

chef-cli fails with error "(Errno::EBADF) Bad file descriptor @ fptr_finalize_flush"

Error message:

[MYUSER@MYPC policyfiles]$ chef-cli update secret.rb
Building policy secret
Expanded run list: recipe[base::default], recipe[secret::default]
Caching Cookbooks...
Installing secret >= 0.0.0 from path
Installing base   0.5.2
Error: Failed to generate Policyfile.lock
Reason: (Errno::EBADF) Bad file descriptor @ fptr_finalize_flush - C:/Users/MYUSER/OneDrive - SOMENAME/Documents/LOCAL_CHEF/local/policyfiles/secret.lock.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    Triage: Not ReproducibleIndicates an issue can not be reproduced as described.Type: BugDoes not work as expected.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions