Changeset View
Changeset View
Standalone View
Standalone View
src/configuration/ArcanistConfigurationManager.php
| Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | public function readLocalArcConfig() { | ||||
| return array(); | return array(); | ||||
| } | } | ||||
| public function writeLocalArcConfig(array $config) { | public function writeLocalArcConfig(array $config) { | ||||
| if ($this->workingCopy) { | if ($this->workingCopy) { | ||||
| return $this->workingCopy->writeLocalArcConfig($config); | return $this->workingCopy->writeLocalArcConfig($config); | ||||
| } | } | ||||
| throw new Exception(pht("No working copy to write config to!")); | throw new Exception(pht('No working copy to write config to!')); | ||||
| } | } | ||||
| /** | /** | ||||
| * This is probably not the method you're looking for; try | * This is probably not the method you're looking for; try | ||||
| * @{method:readUserArcConfig}. | * @{method:readUserArcConfig}. | ||||
| */ | */ | ||||
| public function readUserConfigurationFile() { | public function readUserConfigurationFile() { | ||||
| static $user_config; | static $user_config; | ||||
| ▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | public function writeUserConfigurationFile($config) { | ||||
| if (!phutil_is_windows()) { | if (!phutil_is_windows()) { | ||||
| execx('chmod 600 %s', $path); | execx('chmod 600 %s', $path); | ||||
| } | } | ||||
| } | } | ||||
| public function setUserConfigurationFileLocation($custom_arcrc) { | public function setUserConfigurationFileLocation($custom_arcrc) { | ||||
| if (!Filesystem::pathExists($custom_arcrc)) { | if (!Filesystem::pathExists($custom_arcrc)) { | ||||
| throw new Exception( | throw new Exception( | ||||
| "Custom arcrc file was specified, but it was not found!"); | 'Custom arcrc file was specified, but it was not found!'); | ||||
| } | } | ||||
| $this->customArcrcFilename = $custom_arcrc; | $this->customArcrcFilename = $custom_arcrc; | ||||
| } | } | ||||
| public function getUserConfigurationFileLocation() { | public function getUserConfigurationFileLocation() { | ||||
| if (strlen($this->customArcrcFilename)) { | if (strlen($this->customArcrcFilename)) { | ||||
| return $this->customArcrcFilename; | return $this->customArcrcFilename; | ||||
| ▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines | |||||