Skip to content
Discussion options

You must be logged in to vote

I don't know your knowledge cutoff ^^ but the code ChatGPT generated is wrong, because deploy_path refers to the target system. Like I said, what needs to be done is a song-and-dance with putenv, like so:

  $old_root = getenv('DEPLOYER_ROOT') ?: __DIR__;
  putenv("DEPLOYER_ROOT={$local_base}");
  upload(
    $files,
    '{{current_path}}',
    ['progress_bar' => false, 'options' => ['--relative']]
  );
  putenv("DEPLOYER_ROOT={$old_root}");

While I don't mind using ChatGPT to formulate responses, I think removing the obvious giveaways like "my knowledge cutoff" and maybe sanity checking the answer might be useful... ;)

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@antonmedv
Comment options

Comment options

You must be logged in to vote
3 replies
@antonmedv
Comment options

@teal-bauer
Comment options

Answer selected by teal-bauer
@antonmedv
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants