chef / chef/mixlib-install

0 byte builds cause a silent exit

Open
#290 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
Ruby
Stars
13
Forks
55
Avg merge
2d 15h
Merged PRs (30d)
8

Description

Version:

3.11.18

Environment:

Mac OS Mojave 10.14.5

Scenario:

The build is 0 bytes, but since we exit the same way for an error and a zero byte file, that is difficult to determine.

Steps to Reproduce:

mixlib-install install-script | sudo bash -s -- -P inspec -d /tmp -l https://packages.chef.io/files/unstable/inspec/4.7.23/mac_os_x/10.14/inspec-4.7.23-1.dmg

Expected Result:

An error is raised that the build is 0 bytes

Actual Result:

The stderr output of all the tools is raised, which don't appear incorrect unless you notice the size.

https://github.com/chef/mixlib-install/blob/93b25ce641012d5e9ec22045c7a2bf2395fafc16/lib/mixlib/install/generator/bourne/scripts/helpers.sh.erb#L128

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at lib/mixlib/install/generator/bourne/scripts/helpers.sh.erb around line 128 and reproduce the install command from the issue. Check how a zero-byte build is handled versus a command error; done means the command reports explicitly that the build is 0 bytes instead of only surfacing tool stderr.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby, shell
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.