Skip to content

Commit

Permalink
Allow "0"
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Feb 29, 2024
1 parent 823cf10 commit e6dce9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/src/Environment/Docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ public function run_inside_docker( EnvInfo $env_info, array $command, array $env

// Check if user is not set and try to set it from ENV vars or posix functions.
if ( is_null( $user ) ) {
$envUser = getenv( 'QIT_DOCKER_USER' );
$envGroup = getenv( 'QIT_DOCKER_GROUP' );
$env_user = getenv( 'QIT_DOCKER_USER' );
$env_group = getenv( 'QIT_DOCKER_GROUP' );

if ( $envUser && $envGroup ) {
if ( $env_user !== false && $env_group !== false ) {
// Use user and group from environment variables.
$user = $envUser . ':' . $envGroup;
$user = $env_user . ':' . $env_group;
} elseif ( function_exists( 'posix_getuid' ) && function_exists( 'posix_getgid' ) ) {
// Use user and group from posix functions.
$user = posix_getuid() . ':' . posix_getgid();
Expand Down

0 comments on commit e6dce9a

Please sign in to comment.