Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: force usage of env variables when vite-envs.sh execution fails #596

Conversation

gpuente
Copy link

@gpuente gpuente commented Oct 30, 2024

Description:

MacOS and Linux: No changes

in Windows:
if running connect from git bash or something similar, the app follows the normal flow (runs vite-envs.sh to define the env variables)

if running in PowerShell or something similar, the flow is executed as follow (before start the dev server):

  • creates a backup of the index.html
  • updates the index.html by removing default base64 values for LOCAL_DOCUMENT_MODELS and LOCAL_DOCUMENT_EDITORS in envWithValuesInBase64 object (this forces the devServer to take the values from process.env)
  • starts the dev server

the backup file is restored before running the vite-envs.sh, this allows windows users to change between powershell and bash compatible command lines

2024-10-30 16 08 58

@gpuente gpuente requested a review from acaldas October 30, 2024 19:06
@gpuente gpuente merged commit f2cdf42 into develop Nov 6, 2024
5 of 6 checks passed
@gpuente gpuente deleted the 588-fix-not-linked-document-models-and-editors-when-running-studio-with-powershell-windows branch November 6, 2024 05:06
Copy link

github-actions bot commented Nov 6, 2024

🎉 This PR is included in version 1.0.0-dev.158 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants