Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-2387

Follow XDG Base Directory Specification

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0

      Description

      The "mender-cli" utility stores the token under ~/.mender/ , ref: https://sources.debian.org/src/mender-cli/1.1.0-1/cmd/util.go/#L36

      Please consider following the XDG Base Directory Specification, see:
      https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

      Golang seems to have a helper funciton for this specific case, see:
      https://godoc.org/github.com/golang/build/maintner/godata#XdgCacheDir

      That would mean that cache files (like tokens) normally end up under: ~/.cache/mender/
      (but you can override the directory using the standardized environment variables as specified in the xdg base dir spec.)

      This is a specific example I've spotted, but it would be nice if the XDG Base directories where adhered to everywhere instead of using "old-school" ~/.mender/ for everything....

      PS. Unused/dead code: https://sources.debian.org/src/mender-cli/1.1.0-1/cmd/root.go/#L29

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andhe Andreas Henriksson
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel