Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Persefone.jl
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Persefone
Persefone.jl
Commits
5c8c89b2
Commit
5c8c89b2
authored
7 months ago
by
xo30xoqa
Browse files
Options
Downloads
Patches
Plain Diff
Fixed git related error in saveinputdata()
parent
622a5e79
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/output.jl
+5
-1
5 additions, 1 deletion
src/core/output.jl
with
5 additions
and
1 deletion
src/core/output.jl
+
5
−
1
View file @
5c8c89b2
...
@@ -88,7 +88,11 @@ settings used. This allows replicating a run in future.
...
@@ -88,7 +88,11 @@ settings used. This allows replicating a run in future.
function
saveinputfiles
(
model
::
SimulationModel
)
function
saveinputfiles
(
model
::
SimulationModel
)
#XXX If this is a parallel run, we should save the global config to the top-level
#XXX If this is a parallel run, we should save the global config to the top-level
# output directory
# output directory
currentcommit
=
read
(
`git rev-parse HEAD`
,
String
)[
1
:
8
]
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
=
"********"
end
mkpath
(
joinpath
(
@param
(
core
.
outdir
),
RECORDDIR
))
mkpath
(
joinpath
(
@param
(
core
.
outdir
),
RECORDDIR
))
open
(
joinpath
(
@param
(
core
.
outdir
),
RECORDDIR
,
basename
(
@param
(
core
.
configfile
))),
"w"
)
do
f
open
(
joinpath
(
@param
(
core
.
outdir
),
RECORDDIR
,
basename
(
@param
(
core
.
configfile
))),
"w"
)
do
f
println
(
f
,
"#
\n
# --- Persefone configuration parameters ---"
)
println
(
f
,
"#
\n
# --- Persefone configuration parameters ---"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment