Split non-interactive and bad credential cases
parent
b437c1cc05
commit
f3c112e9e0
|
@ -324,8 +324,8 @@ class RemoteFilesystem
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fail if we already have auth or the console is not interactive
|
// fail if the console is not interactive
|
||||||
if (!$this->io->isInteractive() || $this->io->hasAuthentication($this->originUrl)) {
|
if (!$this->io->isInteractive()) {
|
||||||
if ($httpStatus === 401) {
|
if ($httpStatus === 401) {
|
||||||
$message = "The '" . $this->fileUrl . "' URL required authentication.\nYou must be using the interactive console to authenticate";
|
$message = "The '" . $this->fileUrl . "' URL required authentication.\nYou must be using the interactive console to authenticate";
|
||||||
}
|
}
|
||||||
|
@ -335,6 +335,10 @@ class RemoteFilesystem
|
||||||
|
|
||||||
throw new TransportException($message, $httpStatus);
|
throw new TransportException($message, $httpStatus);
|
||||||
}
|
}
|
||||||
|
// fail if we already have auth
|
||||||
|
if ($this->io->hasAuthentication($this->originUrl)) {
|
||||||
|
throw new TransportException("Invalid credentials for '" . $this->fileUrl . "', aborting.", $httpStatus);
|
||||||
|
}
|
||||||
|
|
||||||
$this->io->overwrite(' Authentication required (<info>'.parse_url($this->fileUrl, PHP_URL_HOST).'</info>):');
|
$this->io->overwrite(' Authentication required (<info>'.parse_url($this->fileUrl, PHP_URL_HOST).'</info>):');
|
||||||
$username = $this->io->ask(' Username: ');
|
$username = $this->io->ask(' Username: ');
|
||||||
|
|
Loading…
Reference in New Issue