Skip to content

Commit 7a1eebf

Browse files
authored
Merge pull request #63 from brefphp/osls-without-colors
Run osls without colors, even when `FORCE_COLOR` is set
2 parents 40c7162 + a049b1e commit 7a1eebf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/Components/ServerlessFramework.php‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ private function serverlessExec(string $oslsPackage, string $command, string $en
223223
'AWS_ACCESS_KEY_ID' => $awsCredentials['accessKeyId'],
224224
'AWS_SECRET_ACCESS_KEY' => $awsCredentials['secretAccessKey'],
225225
'AWS_SESSION_TOKEN' => $awsCredentials['sessionToken'],
226+
// The output is parsed (`serverless info`) and pushed as the deployment logs: no colors, even when
227+
// `FORCE_COLOR` is set, e.g. by a CI or an agent (`--no-color` doesn't win over `FORCE_COLOR`)
228+
'FORCE_COLOR' => '0',
226229
];
227230
// Merge the current environment with the AWS credentials
228231
$env = array_merge(getenv(), $env);

0 commit comments

Comments
 (0)