Skip to content

Commit

Permalink
Revert "Add batch file support (for working on windows)"
Browse files Browse the repository at this point in the history
This reverts commit aba79b0.
  • Loading branch information
3846masa committed Feb 5, 2017
1 parent 10e10a0 commit cdc5a05
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions packages/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"io/ioutil"
"os"
"path"
"runtime"
"strings"

"gopkg.in/yaml.v2"
Expand Down Expand Up @@ -37,15 +36,6 @@ func (pm *PackageManager) Install(pkg *Package) error {
}

d = append([]byte("#!/usr/bin/env whalebrew\n"), d...)

if runtime.GOOS == "windows" {
batch := []byte("@whalebrew %~dp0\\" + pkg.Name + " %*")
batchPath := packagePath + ".bat"
if err := ioutil.WriteFile(batchPath, batch, 0755); err != nil {
return err
}
}

return ioutil.WriteFile(packagePath, d, 0755)
}

Expand Down Expand Up @@ -99,14 +89,6 @@ func (pm *PackageManager) Uninstall(packageName string) error {
if !isPackage {
return fmt.Errorf("%s is not a Whalebrew package", p)
}
if runtime.GOOS == "windows" {
batchPath := p + ".bat"
if _, err := os.Stat(batchPath); err == nil {
if err := os.Remove(batchPath); err != nil {
return err
}
}
}
return os.Remove(p)
}

Expand Down

0 comments on commit cdc5a05

Please sign in to comment.