Skip to content

Commit

Permalink
fix windows: clean the outputFolderUri (#1135)
Browse files Browse the repository at this point in the history
  • Loading branch information
changlong-liu authored Feb 24, 2022
1 parent 36cec0b commit 58a3ead
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autorest/black/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# --------------------------------------------------------------------------
import logging
from pathlib import Path
import os
import black

from .. import Plugin
Expand All @@ -21,6 +22,8 @@ def __init__(self, autorestapi):
output_folder_uri = self._autorestapi.get_value("outputFolderUri")
if output_folder_uri.startswith("file:"):
output_folder_uri = output_folder_uri[5:]
if os.name == 'nt' and output_folder_uri.startswith("///"):
output_folder_uri = output_folder_uri[3:]
self.output_folder = Path(output_folder_uri)

def process(self) -> bool:
Expand Down

0 comments on commit 58a3ead

Please sign in to comment.