Skip to content
Snippets Groups Projects
Commit bb8a367a authored by xo30xoqa's avatar xo30xoqa
Browse files

Fixed scoping error in the last bug fix...

parent 5c8c89b2
No related branches found
No related tags found
No related merge requests found
......@@ -88,10 +88,11 @@ settings used. This allows replicating a run in future.
function saveinputfiles(model::SimulationModel)
#XXX If this is a parallel run, we should save the global config to the top-level
# output directory
currentcommit = "********"
try # if this is loaded as a package, the directory may not be a git repo
currentcommit = read(`git rev-parse HEAD`, String)[1:8]
catch
currentcommit = "********"
@debug "saveinputfiles(): not a git repo."
end
mkpath(joinpath(@param(core.outdir), RECORDDIR))
open(joinpath(@param(core.outdir), RECORDDIR, basename(@param(core.configfile))), "w") do f
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment