Permalink
Browse files

Fix missing windows? fn reference

  • Loading branch information...
adamrenklint committed Feb 22, 2018
1 parent d1c9828 commit c5f71c2371d99b75f96401c19e650a800942f1ec
Showing with 11 additions and 5 deletions.
  1. +4 −0 CHANGELOG.md
  2. +1 −1 README.md
  3. +1 −1 build.boot
  4. +5 −3 src/adamrenklint/boot_exec.clj
@@ -1,5 +1,9 @@
# Changelog
## v1.1 - 2018-02-22
- Added Windows support [#1](https://github.com/adamrenklint/boot-exec/pull/1) ([mkarp](https://github.com/mkarp))
## v1.0.1 - 2017-12-12
- Fixed issue with `dir` option not working
@@ -7,7 +7,7 @@ Boot task to execute a shell command, without changing the fileset
)](https://circleci.com/gh/adamrenklint/boot-exec)
```clojure
[adamrenklint/boot-exec "1.0.1"] ;; latest release
[adamrenklint/boot-exec "1.1.0"] ;; latest release
```
## Usage
@@ -1,5 +1,5 @@
(def project 'adamrenklint/boot-exec)
(def version "1.0.2")
(def version "1.1.0")
(set-env!
:source-paths #{"src"}
@@ -2,8 +2,10 @@
{:boot/export-tasks true}
(:require [boot.core :as core]
[boot.util :as util]
[clojure.string :as string]
[cljs.util :refer [windows?]]))
[clojure.string :as string]))
(def windows?
(.startsWith (.toLowerCase (System/getProperty "os.name")) "windows"))
(core/deftask exec
"Execute a shell command, without changing the fileset"
@@ -15,5 +17,5 @@
(core/with-pass-thru _
(when (pred?)
(binding [util/*sh-dir* (or dir ".")]
(let os-cmd (if windows? (str "cmd /c " cmd) cmd)
(let [os-cmd (if windows? (str "cmd /c " cmd) cmd)]
(apply util/dosh (string/split os-cmd #" "))))))))

0 comments on commit c5f71c2

Please sign in to comment.