Skip to content

fix (samples): replace sed -i '' with perl -i -pe for Linux/WSL compatibility#44

Open
Ben-Dowling wants to merge 1 commit intodatabricks-solutions:mainfrom
Ben-Dowling:fix/samples-sed-linux-wsl-compatibility
Open

fix (samples): replace sed -i '' with perl -i -pe for Linux/WSL compatibility#44
Ben-Dowling wants to merge 1 commit intodatabricks-solutions:mainfrom
Ben-Dowling:fix/samples-sed-linux-wsl-compatibility

Conversation

@Ben-Dowling
Copy link
Copy Markdown

Fixes #43 - Raised bug to document the issue

Problem

samples/common.sh uses sed -i '' which is macOS-specific syntax. On Linux and WSL this silently fails, leaving pipeline config files (e.g. pipeline_configs/dev_substitutions.json) without the necessary substitutions, causing sample pipelines to fail.

Solution

Replaced sed -i '' with perl -i -pe which performs the same in-place substitution but works cross-platform (macOS, Linux, WSL).

Testing

  • Verified on MinGW terminal on Windows using Databricks CLI v0.297.2
  • Ran samples/deploy.sh and confirmed substitutions are correctly applied to pipeline config files
  • Sample pipeline (Lakeflow Framework - Run 1 - Load and Schema Initialization) runs dependent tasks successfully.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Sample deployment: sed -i '' substitution command not compatible with Linux and Windows Subsystem Linux

1 participant