sort to easy reading config in shell

pull/493/head
qkqpttgf 2021-12-15 09:47:34 +08:00 committed by GitHub
parent 270c73afb5
commit 341124e5b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -158,6 +158,7 @@ function setConfig($arr, $disktag = '')
} }
} }
$envs = array_filter($envs, 'array_value_isnot_null'); $envs = array_filter($envs, 'array_value_isnot_null');
sortConfig($envs);
$response = ReplitAPI('w', 'REPLIT_CONFIG', json_encode($envs)); $response = ReplitAPI('w', 'REPLIT_CONFIG', json_encode($envs));
//error_log1(json_encode($arr, JSON_PRETTY_PRINT) . ' => tmp' . json_encode($envs, JSON_PRETTY_PRINT)); //error_log1(json_encode($arr, JSON_PRETTY_PRINT) . ' => tmp' . json_encode($envs, JSON_PRETTY_PRINT));
savecache('REPLIT_CONFIG', null, '', 0); savecache('REPLIT_CONFIG', null, '', 0);