Skip to content

Commit

Permalink
Remove git code on windows
Browse files Browse the repository at this point in the history
[#162895264] pivotal-cf/winfs-injector #5: `winfs-injector` doesn't work on windows due to permission errors

Signed-off-by: Chris Hendrix <[email protected]>
  • Loading branch information
Caitlyn Yu authored and Chris Hendrix committed Jan 2, 2019
1 parent 1da2335 commit 05d5ddb
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions winfsinjector/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"regexp"
"runtime"
"strings"

yaml "gopkg.in/yaml.v2"
Expand Down Expand Up @@ -94,22 +92,6 @@ func (a Application) Run(inputTile, outputTile, workingDir string) error {
return err
}

if runtime.GOOS == "windows" {
cmd := exec.Command("git", "config", "core.filemode", "false")
cmd.Dir = embeddedReleaseDir
stdoutStderr, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("unable to fix file permissions for windows: %s, %s", stdoutStderr, err)
}

cmd = exec.Command("git", "submodule", "foreach", "git", "config", "core.filemode", "false")
cmd.Dir = embeddedReleaseDir
stdoutStderr, err = cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("unable to fix file permissions for windows: %s, %s", stdoutStderr, err)
}
}

releaseName, err := a.extractReleaseName(embeddedReleaseDir)
if err != nil {
return err
Expand Down

0 comments on commit 05d5ddb

Please sign in to comment.