Changeset View
Changeset View
Standalone View
Standalone View
src/configuration/ArcanistConfigurationManager.php
| Show First 20 Lines • Show All 264 Lines • ▼ Show 20 Lines | public function getUserConfigurationFileLocation() { | ||||
| if (phutil_is_windows()) { | if (phutil_is_windows()) { | ||||
| return getenv('APPDATA').'/.arcrc'; | return getenv('APPDATA').'/.arcrc'; | ||||
| } else { | } else { | ||||
| return getenv('HOME').'/.arcrc'; | return getenv('HOME').'/.arcrc'; | ||||
| } | } | ||||
| } | } | ||||
| public function readUserArcConfig() { | public function readUserArcConfig() { | ||||
| return idx($this->readUserConfigurationFile(), 'config', array()); | $config = $this->readUserConfigurationFile(); | ||||
| if (isset($config['config'])) { | |||||
| $config = $config['config']; | |||||
| } | |||||
| return $config; | |||||
| } | } | ||||
| public function writeUserArcConfig(array $options) { | public function writeUserArcConfig(array $options) { | ||||
| $config = $this->readUserConfigurationFile(); | $config = $this->readUserConfigurationFile(); | ||||
| $config['config'] = $options; | $config['config'] = $options; | ||||
| $this->writeUserConfigurationFile($config); | $this->writeUserConfigurationFile($config); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines | |||||