Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Config runCommand should return result #350

Closed
jamessimone opened this issue Jan 14, 2023 · 5 comments
Closed

Config runCommand should return result #350

jamessimone opened this issue Jan 14, 2023 · 5 comments

Comments

@jamessimone
Copy link

I'm not sure if this was the intended behavior or not, but I noticed recently while working with SFDX and TypeScript that the result of commands bubbles nearly all the way up to the caller - only to be abandoned here. I'm guessing that the intent was for the caller to implement postRun to get explicit access to the result, but not all commands do, leaving result to dangle at the penultimate moment.

For my current use-case (scanner:run), I can get around this issue because that command itself can actually write to the filesystem, but it'd be vastly preferable to avoid the extra fs work (and open up the flexibility of other commands' being more easily interacted with at the TypeScript-level).

@git2gus
Copy link

git2gus bot commented Jan 14, 2023

Git2Gus App is installed but the .git2gus/config.json doesn't exist.

@mdonnalley
Copy link
Contributor

@jamessimone This library has been deprecated in favor of @oclif/core, which does return the command result, see https://github.com/oclif/core/blob/main/src/config/config.ts#L349.

I'm going to close this issue but feel free to open another issue in the oclif/core repo if you run into anything else.

@jamessimone
Copy link
Author

@mdonnalley nice - that's amazing to here. I was working on converting a GitHub action which is currently using an older version of SFDX (7.161.0) - do you know if @oclif/core has always returned the result? Basically trying to pinpoint which version of SFDX is likely to first have that version of the dependency.

@mdonnalley
Copy link
Contributor

@jamessimone I believe sfdx began using @oclif/core in 7.163.0

salesforcecli/sfdx-cli#640

@jamessimone
Copy link
Author

@mdonnalley thanks! I guess we'll have to wait for oclif/core#592 and then whenever that gets pulled into SFDX for this to be fully resolved, but I appreciate your help with this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants