Skip to content

Commit 3c7b6f9

Browse files
authored
fix: add use-ssh-private-key-as-inline in construction of cobra command (#31)
1 parent bb26625 commit 3c7b6f9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

cmd/run.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ var runCmd = &cobra.Command{
5959
appName, _ := cmd.Flags().GetString(AppName)
6060
logLevel, _ := cmd.Flags().GetString(LogLevel)
6161
dryRun, _ := cmd.Flags().GetBool(DryRun)
62+
useSSHPrivateKeyAsInline, _ := cmd.Flags().GetBool(UseSSHPrivateKeyAsInline)
6263
helmKVs, _ := cmd.Flags().GetStringToString(HelmKeyValues)
6364

6465
if err := log.SetLogLevel(logLevel); err != nil {
@@ -86,10 +87,11 @@ var runCmd = &cobra.Command{
8687
}
8788

8889
gitCredentials := &git.Credentials{
89-
Username: gitUser,
90-
Email: gitEmail,
91-
Password: gitPass,
92-
SSHPrivKey: sshKey,
90+
Username: gitUser,
91+
Email: gitEmail,
92+
Password: gitPass,
93+
SSHPrivKey: sshKey,
94+
SSHPrivKeyFileInline: useSSHPrivateKeyAsInline,
9395
}
9496

9597
gitConf := &git.Conf{
@@ -119,6 +121,7 @@ var runCmd = &cobra.Command{
119121

120122
if err = runImageUpdater(cfg); err != nil {
121123
logCtx.Errorf("Error trying to update the %s application: %v", appName, err)
124+
os.Exit(1)
122125
}
123126
},
124127
}

0 commit comments

Comments
 (0)