Merge pull request #1358 from rwilson504/overwrite

More consistent download experience for overwrite
This commit is contained in:
Amjed Ayoub 2022-04-06 11:39:42 -07:00 коммит произвёл GitHub
Родитель 2153defa9e dd03d3bce0
Коммит c5bd64f65e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 11 добавлений и 13 удалений

Просмотреть файл

@ -171,14 +171,15 @@ When environment or connector ID is not specified the command will prompt for th
```
Arguments
--cid -c : The custom connector ID.
--dest -d : Destination directory.
--env -e : Power Platform environment ID.
--pau -u : Power Platform URL.
--pav -v : Power Platform API version.
--settings -s : A settings file containing required parameters.
When a settings file is specified some command
line parameters are ignored.
--cid -c : The custom connector ID.
--dest -d : Destination directory.
--env -e : Power Platform environment ID.
--overwrite -w : Overwrite all the existing connector and settings files.
--pau -u : Power Platform URL.
--pav -v : Power Platform API version.
--settings -s : A settings file containing required parameters.
When a settings file is specified some command
line parameters are ignored.
```
### Create a New Custom Connector

Просмотреть файл

@ -47,12 +47,9 @@ def _prepare_directory(destination, connector_id):
# Create a sub-directory in the current directory
# when a destination isn't provided
else:
if os.path.isdir(connector_id):
error = '{} directory already exists. Please remove the directory before continuing.'
raise CLIError(error.format(connector_id))
else:
if not os.path.isdir(connector_id):
os.mkdir(connector_id)
destination = connector_id
destination = connector_id
if os.path.isdir(destination):
os.chdir(destination)