Skip to content

Commit

Permalink
put activation token in the workspace folder
Browse files Browse the repository at this point in the history
Even when workspace is not in default location.
  • Loading branch information
ianic committed Dec 3, 2021
1 parent 88e0476 commit 2c07a7f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions domain/file_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,20 @@ func AppConfigDir() (string, error) {
}

func StoreActivationToken(jwt string) error {
dir, err := AppConfigDir()
dir, _, err := WorkspacePathAndName()
if err != nil {
return err
}
return StoreActivationTokenTo(jwt, dir)
}

func StoreActivationTokenTo(jwt string, dir string) error {
filename := path.Join(dir, activationTokenFilename)
return ioutil.WriteFile(filename, []byte(jwt), os.ModePerm)
}

func ReadActivationToken() (string, error) {
dir, err := AppConfigDir()
dir, _, err := WorkspacePathAndName()
if err != nil {
return "", err
}
Expand Down

0 comments on commit 2c07a7f

Please sign in to comment.