Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions cmd/service_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,9 @@ var installCmd = &cobra.Command{
Example: "cloudfuse service install",
FlagErrorHandling: cobra.ExitOnError,
RunE: func(cmd *cobra.Command, args []string) error {
dir, err := os.Getwd()
if err != nil {
return fmt.Errorf("unable to determine location of cloudfuse binary [%s]", err.Error())
}
programPath := filepath.Join(dir, "windows-startup.exe")
programPath := filepath.Join("C:", "Program Files", "Cloudfuse", "windows-startup.exe")
startupPath := filepath.Join(os.Getenv("APPDATA"), "Microsoft", "Windows", "Start Menu", "Programs", "Startup", StartupName)
err = makeLink(programPath, startupPath)
err := makeLink(programPath, startupPath)
if err != nil {
return fmt.Errorf("unable to create startup link [%s]", err.Error())
}
Expand Down