GiteaBot / gitea-backporter

:tea: A script that looks for PRs in Gitea that need to be backported and creates the backport PR for them
MIT License
17 stars 8 forks source link

Use `Deno.Command` instead of the deprecated `Deno.run` #72

Closed yardenshoham closed 1 year ago

yardenshoham commented 1 year ago

See https://github.com/denoland/deno/discussions/9435

silverwind commented 1 year ago

The new operator does not compose well with other constructs like await, how about making a wrapper function to eliminate the problem?

function run(...args) {
  // could log command here for debug
  const cmd = new Deno.Command(...args);
  // could log result here for debug
  return cmd;
}