Skip to content

Commit

Permalink
support local installs on Windows (#38)
Browse files Browse the repository at this point in the history
Co-authored-by: Radford Smith <11401+rads@users.noreply.github.com>
  • Loading branch information
bobisageek and rads committed Sep 30, 2022
1 parent 8f0505d commit 7487221
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,8 @@
# Changelog

## Unreleased
- [local installs without aliases throw exception on Windows](https://github.com/babashka/bbin/issues/37)

## 0.1.3

- [Fix script args being ignored when installing JARs](https://github.com/babashka/bbin/commit/ac85b8f984c8a30683c219d8d0faa32ef91e93e2)
Expand Down
8 changes: 4 additions & 4 deletions bbin
Expand Up @@ -381,10 +381,10 @@ WARNING: - Set the BABASHKA_BBIN_BIN_DIR env variable to \"$HOME/.babashka/bbi
#"\."))))

(defn- file-path->script-name [file-path]
(util/snake-case
(first
(str/split (last (str/split file-path #"/"))
#"\."))))
(-> file-path
fs/file-name
fs/strip-ext
util/snake-case))

(defn- bb-shebang? [s]
(str/starts-with? s "#!/usr/bin/env bb"))
Expand Down
8 changes: 4 additions & 4 deletions src/babashka/bbin/scripts.clj
Expand Up @@ -222,10 +222,10 @@
#"\."))))

(defn- file-path->script-name [file-path]
(util/snake-case
(first
(str/split (last (str/split file-path #"/"))
#"\."))))
(-> file-path
fs/file-name
fs/strip-ext
util/snake-case))

(defn- bb-shebang? [s]
(str/starts-with? s "#!/usr/bin/env bb"))
Expand Down

0 comments on commit 7487221

Please sign in to comment.