-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable the extensions performed by
fs
(#356)
These could affect end-users. Fixes #355
- Loading branch information
Showing
7 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(ns refactor-nrepl.fs | ||
"Sets the compile-time feature-flags from the `fs` library. | ||
This ns should be `require`d before any other `fs` ns." | ||
(:require | ||
[me.raynes.fs.feature-flags])) | ||
|
||
(alter-var-root #'me.raynes.fs.feature-flags/extend-coercions? (constantly false)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(ns refactor-nrepl.fs-test | ||
(:require | ||
[clojure.java.io :as io] | ||
[clojure.test :refer [deftest is]]) | ||
(:import | ||
(java.io File))) | ||
|
||
(require '[refactor-nrepl.fs]) | ||
|
||
(deftest extensions-are-disabled | ||
(is (try | ||
(-> "project.clj" File. .toPath io/file) | ||
false | ||
(catch Exception e | ||
(assert (-> e | ||
.getMessage | ||
#{"No implementation of method: :as-file of protocol: #'clojure.java.io/Coercions found for class: sun.nio.fs.UnixPath"})) | ||
true)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters