Skip to content

Commit

Permalink
cmd/run: Prepare the general cache directory
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Jung <a.jung@lancs.ac.uk>
  • Loading branch information
nderjung committed Dec 29, 2020
1 parent 73efa5e commit 26e23c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ func doRunCmd(cmd *cobra.Command, args []string) {
os.MkdirAll(runConfig.WorkDir, os.ModePerm)
}

// Create the caching dir
cacheDir := path.Join(runConfig.WorkDir, ".cache")
if _, err := os.Stat(cacheDir); os.IsNotExist(err) {
os.MkdirAll(cacheDir, os.ModePerm)
}

j, err := job.NewJob(args[0], &job.RuntimeConfig{
Cpus: cpus,
ScheduleGrace: runConfig.ScheduleGrace,
Expand Down

0 comments on commit 26e23c7

Please sign in to comment.