feat: worker: Ensure tempdir exists (#10433)

This commit is contained in:
Łukasz Magiera 2023-05-03 16:59:41 +02:00 committed by GitHub
parent 76776e5cc1
commit 3ff8a09183
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -295,6 +295,13 @@ var runCmd = &cli.Command{
}
}
// ensure tmpdir exists
td := os.TempDir()
if err := os.MkdirAll(td, 0755); err != nil {
return xerrors.Errorf("ensuring temp dir %s exists: %w", td, err)
}
// Check file descriptor limit
limit, _, err := ulimit.GetLimit()
switch {
case err == ulimit.ErrUnsupported: