Skip to content

Commit

Permalink
spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
abangser committed Jul 8, 2024
1 parent 390553d commit 4bcf6cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/writers/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func NewGitWriter(logger logr.Logger, stateStoreSpec v1alpha1.GitStateStoreSpec,

knownHostsFile, err := os.CreateTemp("", "knownHosts")
if err != nil {
return nil, fmt.Errorf("error creating knownhosts file: %w", err)
return nil, fmt.Errorf("error creating knownHosts file: %w", err)
}

knownHostsFile.Write(knownHosts)
Expand All @@ -68,7 +68,7 @@ func NewGitWriter(logger logr.Logger, stateStoreSpec v1alpha1.GitStateStoreSpec,
sshKey.HostKeyCallback = knownHostsCallback
err = os.Remove(knownHostsFile.Name())
if err != nil {
return nil, fmt.Errorf("error removing knownhosts file: %w", err)
return nil, fmt.Errorf("error removing knownHosts file: %w", err)
}

authMethod = sshKey
Expand Down Expand Up @@ -146,7 +146,7 @@ func (g *GitWriter) update(subDir, workPlacementName string, workloadsToCreate [
//returned by `filepath.Join` is still contained with the git repository:
// Note: This means `../` can still be used, but only if the end result is still contained within the git repository
if !strings.HasPrefix(absoluteFilePath, localTmpDir) {
log.Error(nil, "Path of file to write is not located within the git repository", "absolutePath", absoluteFilePath, "tmpDir", localTmpDir)
log.Error(nil, "path of file to write is not located within the git repository", "absolutePath", absoluteFilePath, "tmpDir", localTmpDir)
return "", nil //We don't want to retry as this isn't a recoverable error. Log error and return nil.
}

Expand Down

0 comments on commit 4bcf6cf

Please sign in to comment.