Skip to content

Commit 266f869

Browse files
committed
wrap cd(dir_backup) in try-catch block in case the dir no longer exists
1 parent b6adc3b commit 266f869

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Pipelines"
22
uuid = "ef544631-5c6f-4e9b-994c-12e7a4cd724c"
33
authors = ["Jiacheng Chuan <[email protected]>"]
4-
version = "0.9.9"
4+
version = "0.9.10"
55

66
[deps]
77
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"

docs/src/changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## v0.9.10
4+
5+
- Fix: `run`: wrap `cd(dir_backup)` in try-catch block in case the dir no longer exists. happens because workding dir is not thread safe in Julia. If other program delete the directory, it will fail.
36

47
## v0.9.9
58

src/Program.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,11 @@ function Base.run(p::Program;
282282
end
283283

284284
if dir != ""
285-
cd(dir_backup)
285+
try
286+
# in case the dir no longer exists. happens because workding dir is not thread safe in Julia. If other program delete the directory, it will fail.
287+
cd(dir_backup)
288+
catch
289+
end
286290
end
287291
res
288292
end

0 commit comments

Comments
 (0)