stop tmpfs mode from pushing

This commit is contained in:
Mustafa Gezen 2021-02-25 04:37:01 +01:00
parent 9a6c027db6
commit 920a300fe6
2 changed files with 10 additions and 2 deletions

View File

@ -101,12 +101,16 @@ func mn(_ *cobra.Command, _ []string) {
}
if tmpFsMode {
tmpDir, err := ioutil.TempDir(os.TempDir(), "srpmproc-*")
tmpBaseDir, err := ioutil.TempDir(os.TempDir(), "srpmproc-*")
if err != nil {
log.Fatalf("could not create temp dir: %v", err)
}
log.Printf("using temp dir: %s", tmpDir)
log.Printf("using temp dir: %s", tmpBaseDir)
fsCreator = func() billy.Filesystem {
tmpDir, err := ioutil.TempDir(tmpBaseDir, "*")
if err != nil {
log.Fatalf("could not create temp dir: %v", err)
}
return osfs.New(tmpDir)
}
}

View File

@ -271,6 +271,10 @@ func ProcessRPM(pd *data.ProcessData) {
}
}
if pd.TmpFsMode {
continue
}
var hashes []plumbing.Hash
var pushRefspecs []config.RefSpec