function Perforce::queryP4User
1 call to Perforce::queryP4User()
- Perforce::p4Login in vendor/
composer/ composer/ src/ Composer/ Util/ Perforce.php
File
-
vendor/
composer/ composer/ src/ Composer/ Util/ Perforce.php, line 240
Class
- Perforce
- @author Matt Whittom <Matt.Whittom@veteransunited.com>
Namespace
Composer\UtilCode
public function queryP4User() : void {
$this->getUser();
if (strlen((string) $this->p4User) > 0) {
return;
}
$this->p4User = $this->getP4variable('P4USER');
if (strlen((string) $this->p4User) > 0) {
return;
}
$this->p4User = $this->io
->ask('Enter P4 User:');
if ($this->windowsFlag) {
$command = $this->getP4Executable() . ' set P4USER=' . $this->p4User;
}
else {
$command = 'export P4USER=' . $this->p4User;
}
$this->executeCommand($command);
}