Skip to content

refactor(core): Add more generic 'Invoke-ExternalCommand' instead of 'run'#3432

Merged
r15ch13 merged 1 commit intoScoopInstaller:developfrom
niheaven:refactor-run
May 15, 2019
Merged

refactor(core): Add more generic 'Invoke-ExternalCommand' instead of 'run'#3432
r15ch13 merged 1 commit intoScoopInstaller:developfrom
niheaven:refactor-run

Conversation

@niheaven
Copy link
Copy Markdown
Member

@niheaven niheaven commented May 2, 2019

Refactor run in install.ps1

  • Rename to Invoke-ExternalCommand and move to core.ps1
  • Use Invoke-ExternalCommand to refactor Expand-7zipArchive, Expand-MsiArchive, Expand-InnoArchive

TODO in next PR: Refactor Expand-XXXArchive to use an universal interface, just as Get-HelperPath, for further extending.

@Ash258
Copy link
Copy Markdown
Contributor

Ash258 commented May 2, 2019

I do not see deprecation message for run function Since this function is used inside vcredist packages

@niheaven
Copy link
Copy Markdown
Member Author

niheaven commented May 2, 2019

Isn't it a pure internal function? 😅

Add backward compatible for run and deprecated warning.

@niheaven
Copy link
Copy Markdown
Member Author

niheaven commented May 6, 2019

  • Using 'System.Diagnostics.Process' instead of 'Start-Process'
  • Add -RunAs switch for further usage

@niheaven niheaven changed the title refactor(core): install.ps1/run -> core.ps1/Invoke-ExternalCommand refactor(core): Add more generic 'Invoke-ExternalCommand' instead of 'run' May 15, 2019
@r15ch13 r15ch13 merged commit b9deb57 into ScoopInstaller:develop May 15, 2019
@niheaven niheaven deleted the refactor-run branch May 16, 2019 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants