Skip to content

set-ssh-password.sh prints processed files for all providers to stdout #2005

Description

@sergiopicca

Environment

  • Make target: make build-proxmox-ubuntu-2204
  • Run using container image? (Y/N): N
  • Environment vars:

  • Vars file:

What steps did you take and what happened?

I launched the make target build-proxmox-ubuntu-2204 and I received a very large amount of output in stdout caused to the sed replace performed by the set-ssh-password.sh.

sed -e "s|\$SSH_PASSWORD|$SSH_PASSWORD|g" -e "s|\$ENCRYPTED_SSH_PASSWORD|$ENCRYPTED_SSH_PASSWORD|g" $file | tee ${file%.*}

The script uses the tee command instead of a simple output redirection. As a result, the full content of the processed files is printed to stdout. This generates extremely verbose logs and also exposes files unrelated to the selected provider, since the sed command is executed for every file in the packer folder.

What did you expect to happen?

I would expect file contents to be shown only when a debug variable is enabled, and in that case only for files related to the selected provider.

Relevant log output

Log Output

Anything else you would like to add?

I am using the last released version (v0.1.52)


/kind bug

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions