Skip to content

Commit

Permalink
Use getenv instead as $_ENV isn't reliable
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan McCue <[email protected]>
  • Loading branch information
roborourke and rmccue committed Jul 19, 2021
1 parent 8fc68c0 commit 0f949ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/composer/class-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ protected function is_linux() : bool {
* @return boolean
*/
public static function is_wsl() : bool {
return ! empty( $_ENV['WSL_INTEROP'] );
return getenv( 'WSL_INTEROP' ) !== false;
}

}

0 comments on commit 0f949ef

Please sign in to comment.