Skip to content

Commit 675d55f

Browse files
authored
Strip leading/lagging whitespace from the JuliaFormatter version number (#45)
* Strip leading/lagging whitespace from the JuliaFormatter version number * Update action.yml
1 parent b665111 commit 675d55f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ runs:
1717
shell: julia --color=yes {0}
1818
run: |
1919
import Pkg
20-
version = get(ENV, "jf-version", "1")
20+
21+
# Get the desired JuliaFormatter version number:
22+
_version_original = get(ENV, "jf-version", "1")
23+
24+
# Strip leading and lagging whitespace.
25+
# We need to then convert back to String, because Pkg won't accept SubString:
26+
version = convert(String, strip(_version_original))::String
2127
2228
# Make sure to specify the UUID of the package:
2329
p = Pkg.PackageSpec(

0 commit comments

Comments
 (0)