Merge branch '1.0'
commit
35fbf9bc14
|
@ -234,17 +234,21 @@ directory.
|
||||||
This is merely a helper to manage a project stored in a central location that
|
This is merely a helper to manage a project stored in a central location that
|
||||||
can hold CLI tools or Composer plugins that you want to have available everywhere.
|
can hold CLI tools or Composer plugins that you want to have available everywhere.
|
||||||
|
|
||||||
This can be used to install CLI utilities globally and if you add
|
This can be used to install CLI utilities globally. Here is an example:
|
||||||
`$COMPOSER_HOME/vendor/bin` to your `$PATH` environment variable. Here is an
|
|
||||||
example:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
php composer.phar global require fabpot/php-cs-fixer:dev-master
|
php composer.phar global require fabpot/php-cs-fixer
|
||||||
```
|
```
|
||||||
|
|
||||||
Now the `php-cs-fixer` binary is available globally (assuming you adjusted
|
Now the `php-cs-fixer` binary is available globally. Just make sure your global
|
||||||
your PATH). If you wish to update the binary later on you can just run a
|
[vendor binaries](articles/vendor-binaries.md) directory is in your `$PATH`
|
||||||
global update:
|
environment variable, you can get its location with the following command :
|
||||||
|
|
||||||
|
```sh
|
||||||
|
php composer.phar global config bin-dir --absolute
|
||||||
|
```
|
||||||
|
|
||||||
|
If you wish to update the binary later on you can just run a global update:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
php composer.phar global update
|
php composer.phar global update
|
||||||
|
|
|
@ -146,7 +146,7 @@ class Application extends BaseApplication
|
||||||
if ($commandName !== 'self-update' && $commandName !== 'selfupdate') {
|
if ($commandName !== 'self-update' && $commandName !== 'selfupdate') {
|
||||||
$io->writeError('<warning>Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted</warning>');
|
$io->writeError('<warning>Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted</warning>');
|
||||||
}
|
}
|
||||||
if ($uid = getenv('SUDO_UID')) {
|
if ($uid = (int) getenv('SUDO_UID')) {
|
||||||
// Silently clobber any sudo credentials on the invoking user to avoid privilege escalations later on
|
// Silently clobber any sudo credentials on the invoking user to avoid privilege escalations later on
|
||||||
// ref. https://github.com/composer/composer/issues/5119
|
// ref. https://github.com/composer/composer/issues/5119
|
||||||
Silencer::call('exec', "sudo -u \\#{$uid} sudo -K > /dev/null 2>&1");
|
Silencer::call('exec', "sudo -u \\#{$uid} sudo -K > /dev/null 2>&1");
|
||||||
|
|
|
@ -326,7 +326,7 @@ class GitLabDriver extends VcsDriver
|
||||||
return $this->attemptCloneFallback();
|
return $this->attemptCloneFallback();
|
||||||
}
|
}
|
||||||
$this->io->writeError('<warning>Failed to download ' . $this->owner . '/' . $this->repository . ':' . $e->getMessage() . '</warning>');
|
$this->io->writeError('<warning>Failed to download ' . $this->owner . '/' . $this->repository . ':' . $e->getMessage() . '</warning>');
|
||||||
$gitLabUtil->authorizeOAuthInteractively($this->originUrl, 'Your credentials are required to fetch private repository metadata (<info>'.$this->url.'</info>)');
|
$gitLabUtil->authorizeOAuthInteractively($this->scheme, $this->originUrl, 'Your credentials are required to fetch private repository metadata (<info>'.$this->url.'</info>)');
|
||||||
|
|
||||||
return parent::getContents($url);
|
return parent::getContents($url);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue