Fix windows symlink bug (#248)

This commit is contained in:
Elijah Ahianyo 2023-01-11 19:32:01 +00:00 committed by GitHub
parent b40eafdbb0
commit 897ef161bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -499,7 +499,15 @@ def setup_frontend():
install_frontend_packages()
# Link the assets folder.
ln(src=os.path.join("..", constants.APP_ASSETS_DIR), dest=constants.WEB_ASSETS_DIR)
if platform.system() == "Windows":
# copy asset files to public folder
mkdir(constants.WEB_ASSETS_DIR)
cp(src=constants.APP_ASSETS_DIR, dest=constants.WEB_ASSETS_DIR)
else:
ln(
src=os.path.join("..", constants.APP_ASSETS_DIR),
dest=constants.WEB_ASSETS_DIR,
)
def run_frontend(app: App):