Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Fix delivery local failures by adding 'chef exec' prefix to all commands in project.toml #1145

Merged
merged 2 commits into from
Jan 27, 2017

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Jan 27, 2017

Description

We have encountered a problem when users install ChefDK for the first time and they do not have it on its PATH env variable, they end-up with the following behavior:

$ chef generate cookbook test
$ cd test
$ delivery local unit
Chef Delivery
Running Unit Phase
thread 'main' panicked at 'Unexpected error: Failed to execute process: No such file or directory (os error 2)', src/delivery/command/local.rs:53

The main problem is that the project.toml doesn't have the prefix chef exec to run the unit phase in the context of ChefDK.

This change is adding the prefix to the default generated project.toml so if the user doesn't have ChefDK configured on its PATH, it wont matter and you will be able to run all phases.

$ delivery local unit
Chef Delivery
Running Unit Phase
.

Finished in 2.59 seconds (files took 1.51 seconds to load)
1 example, 0 failures

Issues Resolved

BUG-345

Check List

Signed-off-by: Salim Afiune <afiune@chef.io>
@afiune afiune force-pushed the afiune/BUG-345/fix-project-toml branch from a2d9c6c to 81c311f Compare January 27, 2017 16:53
@tpetchel
Copy link

Looks good 👍 I verified this change resolves the issue.

Signed-off-by: Salim Afiune <afiune@chef.io>
@tduffield tduffield added the Bug label Jan 27, 2017
@tduffield tduffield changed the title Add 'chef exec' prefix to project.toml Fix delivery local failures by adding 'chef exec' prefix to all commands in project.toml Jan 27, 2017
@tduffield tduffield merged commit 3069f14 into master Jan 27, 2017
@thommay thommay added Type: Bug Doesn't work as expected. and removed Bug labels Feb 1, 2017
@tas50 tas50 deleted the afiune/BUG-345/fix-project-toml branch September 26, 2017 17:03
@chef-boneyard chef-boneyard locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Doesn't work as expected.
Development

Successfully merging this pull request may close these issues.

5 participants