Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobAsslaender committed Dec 1, 2022
1 parent a511c11 commit 6e89890
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/CI_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
os:
- ubuntu-latest
arch:
- x64
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
Expand Down Expand Up @@ -44,8 +44,6 @@ jobs:
pwd
ls -l bart
./bart version
- run: |
pip install numpy
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
Expand Down
17 changes: 8 additions & 9 deletions src/BartIO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ function set_bart_path(pathToBart::String)
end

function get_bart_path()
# Check bart toolbox path
bart_path = ENV["TOOLBOX_PATH"]
if isempty(bart_path)
if isfile("/usr/local/bin/bart")
bart_path = "/usr/local/bin"
elseif isfile("/usr/bin/bart")
bart_path = "/usr/bin"
end
if haskey(ENV, "TOOLBOX_PATH")
return ENV["TOOLBOX_PATH"]
elseif isfile("/usr/local/bin/bart")
return "/usr/local/bin"
elseif isfile("/usr/bin/bart")
return "/usr/bin"
else
return nothing
end
return bart_path
end

"""
Expand Down
2 changes: 1 addition & 1 deletion test/testIO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
end

@testset "BART" begin
if isempty(ENV["TOOLBOX_PATH"])
if !haskey(ENV, "TOOLBOX_PATH") || isempty(ENV["TOOLBOX_PATH"])
pathtobart = Sys.isapple() ? "/Users" : "/home"
pathtobart *= "/runner/work/BartIO.jl/BartIO.jl/bart"
set_bart_path(pathtobart)
Expand Down

0 comments on commit 6e89890

Please sign in to comment.