Skip to content

Allow to specify a configuration folder location instead of the default ~/.sfdx or %USERPROFILE%\.sfdx #2202

Description

@mokchend

This repository only supports the Salesforce CLI Core libraries if you have a feature request that is not related to the Core Libraries but instead to the Salesforce CLI or the force commands please submit your issue to the forcedotcome/cli repo not this one.

Is your feature request related to a problem? Please describe.
I'm always frustrated when once I have setup my sfdx aliases, and switch my OS: in docker, in WSL2, in VM ... I lost all conf DX config & alias as i'm not able to specify my own (shared) .sfdx directory amongs differents OS.
Please provide a parameter (defined as optionnal) to specify our own .sfdx directory location.

Describe the solution you'd like
Require the ability to specify a configuration folder that handle the DX (hidden) folder, by default on your user home directory called .sfdx

On Mac OS and Linux, you can find your DX config folder in ~/.sfdx
On Windows, you can use %USERPROFILE%.sfdx

Describe alternatives you've considered
This option is usefull when you want to share your SFDX config folder betwen multiple OS, docker machine or WSL2

Additional context
N/A

Activity

  1. Exordian commented on Dec 30, 2020

    @Exordian

    Please also move from ~/.sfdx to the XDG spec, a library for that would be [1]. This will also make the config directory configurable.

    [1] https://github.com/folder/xdg

  2. R0Wi commented on Jul 21, 2023

    @R0Wi

    If we would for example introduce a new environment variable SFDX_DIR (or the newer SF_DIR), one could allow the end user to overwrite the global sfdx/sf state folders by adjusting these lines to something like:

      public static get SFDX_DIR(): string {
        const baseDir = env.getString('SFDX_DIR', os.homedir());
        return path.join(baseDir, Global.SFDX_STATE_FOLDER);
      }

    @WillieRuemmele is there any interest in incorporating such a feature?

  3. locked and limited conversation to collaborators on Feb 8, 2024
  4. converted this issue into a discussion #2700 on Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions