Skip to content

Commit

Permalink
feat(cmd/vault/create_env_file): Quote values in .env file
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejsika committed Feb 20, 2025
1 parent b5232e7 commit c5b273b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/vault/create_env_file/create_env_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func createEnvFile(vaultAddress, vaultToken, secretPath, mount, envFileName stri
// Write the environment variables to the .env file
for key, value := range secret.Data {
if v, ok := value.(string); ok {
envLine := fmt.Sprintf("%s=%s\n", key, v)
envLine := fmt.Sprintf("%s=\"%s\"\n", key, v)
_, err := file.WriteString(envLine)
if err != nil {
log.Fatalf("Failed to write to %s file: %v", envFileName, err)
Expand Down

0 comments on commit c5b273b

Please sign in to comment.