Merge pull request #658 from SomtochiAma/incorrect-windows-file-path

Coverts backward slash to forward slash in path flag
This commit is contained in:
Stefan Prodan 2021-01-07 11:17:51 +02:00 committed by GitHub
commit 70a87247e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -23,6 +23,7 @@ import (
"net/url"
"os"
"path"
"path/filepath"
"time"
"github.com/spf13/cobra"
@ -261,7 +262,7 @@ func bootstrapGitHubCmdRun(cmd *cobra.Command, args []string) error {
// configure repo synchronization
logger.Actionf("generating sync manifests")
syncManifests, err := generateSyncManifests(repoURL, bootstrapBranch, namespace, namespace, ghPath.String(), tmpDir, ghInterval)
syncManifests, err := generateSyncManifests(repoURL, bootstrapBranch, namespace, namespace, filepath.ToSlash(ghPath.String()), tmpDir, ghInterval)
if err != nil {
return err
}

View file

@ -23,6 +23,7 @@ import (
"net/url"
"os"
"path"
"path/filepath"
"regexp"
"time"
@ -240,7 +241,7 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error {
// configure repo synchronization
logger.Actionf("generating sync manifests")
syncManifests, err := generateSyncManifests(repoURL, bootstrapBranch, namespace, namespace, glPath.String(), tmpDir, glInterval)
syncManifests, err := generateSyncManifests(repoURL, bootstrapBranch, namespace, namespace, filepath.ToSlash(glPath.String()), tmpDir, glInterval)
if err != nil {
return err
}