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

tmpl: fix nil pointer error in Dockerfile.tmpl #53

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

gcurtis
Copy link
Collaborator

@gcurtis gcurtis commented Sep 1, 2022

Summary

Check that each stage is set in the plan before attempting to use its command. This fixes a nil pointer error that occurs when using an empty devbox.json in an unsupported language.

How was it tested?

Ran devbox plan in a Go project with an empty devbox.json.

Check that each stage is set in the plan before attempting to use its
command. This fixes a nil pointer error that occurs when using an empty
devbox.json in an unsupported language.
Copy link
Contributor

@loreto loreto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gcurtis gcurtis merged commit 1ad1bd7 into main Sep 1, 2022
@gcurtis gcurtis deleted the gcurtis/fix-docker-tmpl branch September 1, 2022 20:12
@ebauger
Copy link

ebauger commented Sep 13, 2022

I got this problem on the 0.0.4

$ devbox build
Error: template: Dockerfile.tmpl:44:26: executing "Dockerfile.tmpl" at <.StartStage.Image>: nil pointer evaluating *planner.Stage.Image
Usage:
  devbox build [<dir>] [flags]

Flags:
      --engine string   Engine used to build the container: 'docker', 'podman' (default "docker")
  -h, --help            help for build
      --no-cache        Do not use a cache

@loreto
Copy link
Contributor

loreto commented Sep 13, 2022

@ebauger We just released 0.0.5 and it includes this PR. Hopefully that fixes it!

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

Successfully merging this pull request may close these issues.

None yet

3 participants