now sync needs to run as root
This commit is contained in:
@@ -105,11 +105,10 @@ var syncCmd = &cobra.Command{
|
|||||||
log.Fatal("index.db does not exist, try to use \"packets sync\"")
|
log.Fatal("index.db does not exist, try to use \"packets sync\"")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
f, err := os.OpenFile(consts.IndexDB, os.O_WRONLY, 0)
|
|
||||||
if err != nil {
|
if os.Getuid() != 0 {
|
||||||
log.Fatalf("can't open to write [ %s ]. Are you running packets as root?\n", consts.IndexDB)
|
log.Fatal("are you running packets as root?")
|
||||||
}
|
}
|
||||||
f.Close()
|
|
||||||
|
|
||||||
syncUrl := consts.DefaultSyncUrl
|
syncUrl := consts.DefaultSyncUrl
|
||||||
if len(args) > 0 {
|
if len(args) > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user