未验证 提交 56539e2e 编写于 作者: J João Moreno 提交者: GitHub

Merge pull request #32222 from dericcain/master

Added ability to use tilde as home dir in config for cloning repos
......@@ -328,7 +328,13 @@ export class CommandCenter {
}
const config = workspace.getConfiguration('git');
const value = config.get<string>('defaultCloneDirectory') || os.homedir();
let value;
const userInputtedDirectory = config.get<string>('defaultCloneDirectory');
if (userInputtedDirectory !== undefined && userInputtedDirectory.match(/^~/)) {
value = userInputtedDirectory.replace(/^~/, os.homedir());
} else {
value = config.get<string>('defaultCloneDirectory') || os.homedir();
}
const parentPath = await window.showInputBox({
prompt: localize('parent', "Parent Directory"),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册