Allow command execution outside project directory without sfdx-project.json #2932
Replies: 4 comments 1 reply
-
@Amit-Tripathi - I've felt similar frustration and would like to improve this. Currently under consideration via W-16189175 |
Beta Was this translation helpful? Give feedback.
-
hey, we've updated 3 packaging commands to allow them to run outside a project: the rest mentioned there can also be updated for the same but will require some refactoring in the libs so we'll cover those in a separate WI: W-16286213 please let me know if there's a specific command that you don't see listed there. |
Beta Was this translation helpful? Give feedback.
-
Hello, thanks for addressing this suggestion! Amit reached out to me for input on this through our external Slack connection channel. I'm including my thoughts from our thread. This is my view on priority order for the commands that have yet to be migrated based on my experience.
Also I didn't know that the --package flag would reference the aliases in the sfdx-project.json. I would encourage an update to the way it's described here to help make that connection for consumers.
I appreciate the updates and I'll enjoy my newfound freedom for running commands. Soon I'll be able to remove my fake sfdx-project.json file. It's encouraging to hear that you had similar frustrations about the commands. |
Beta Was this translation helpful? Give feedback.
-
The last part of this was delivered in sf v2.56.7, see release notes: Please let us know if there are other commands you think shouldn't require a project (some do on purpose because they need to read/write to sfdx-project.json) |
Beta Was this translation helpful? Give feedback.
-
Let me run commands that are environment-agnostic outside of a project directory. I should be able to list packages or package versions anywhere in my terminal. The .sf auth files are in my root dir and it shouldn’t need to be in a SF project to run it.
If I try to run commands such as
sf package version list
orsf package list
, they will error out unless I have a file named sfdx-project.json. There doesn't need to be anything in the file so I created a blank sfdx-project.json in my home directory as a workaround.Some commands do run without it like sf org list but not all commands.
Beta Was this translation helpful? Give feedback.
All reactions