-
Notifications
You must be signed in to change notification settings - Fork 30.3k
Support XDG Base Directory Specfication #59430
Copy link
Copy link
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterplatform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterplatform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Use case
There is a XDG Base Directory Specification which supports keeping home directory in Linux environments tidy. Currently, flutter keeps its global configuration in $HOME/.flutter and $HOME/.flutter_tool_state. According to the above mentioned specification, it is advised to keep configuration under $HOME/.config directory by default.
Proposal
Allow user to set an environment variable to override default directory of flutter config files. This way it won't affect configuration of current users.
Alternatively, a fallback check to $HOME can be done if configuration does not exist in XDG base directory. This way XDG specification will be followed by default without having to set any environment variables.