mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-10-21 21:52:07 +02:00
Worker: fix "failed to retrieve Orchard's home directory path" (#309)
When running through launchd and no HOME is set.
This commit is contained in:
@@ -3,14 +3,9 @@
|
||||
package worker
|
||||
|
||||
import (
|
||||
"github.com/cirruslabs/orchard/internal/orchardhome"
|
||||
"github.com/spf13/cobra"
|
||||
"log"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
var dataDirPath string
|
||||
|
||||
func NewCommand() *cobra.Command {
|
||||
command := &cobra.Command{
|
||||
Use: "worker",
|
||||
@@ -19,13 +14,5 @@ func NewCommand() *cobra.Command {
|
||||
|
||||
command.AddCommand(newRunCommand())
|
||||
|
||||
orchardHome, err := orchardhome.Path()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
command.PersistentFlags().StringVar(&dataDirPath, "data-dir", filepath.Join(orchardHome, "worker"),
|
||||
"path to the worker's data directory")
|
||||
|
||||
return command
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user