Skip to content

Commit 5e2f14f

Browse files
authored
Merge pull request #34 from bekkii77/shell-safe-file-paths
Shell safe file paths
2 parents aa92a74 + bbb4406 commit 5e2f14f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/tasks/build.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CSS_BUILD_PATH = Rails.root.join("app/assets/builds")
44

55
def dartsass_build_mapping
66
Rails.application.config.dartsass.builds.map { |input, output|
7-
"#{CSS_LOAD_PATH.join(input)}:#{CSS_BUILD_PATH.join(output)}"
7+
"#{Shellwords.escape(CSS_LOAD_PATH.join(input))}:#{Shellwords.escape(CSS_BUILD_PATH.join(output))}"
88
}.join(" ")
99
end
1010

@@ -13,7 +13,7 @@ def dartsass_build_options
1313
end
1414

1515
def dartsass_load_paths
16-
[ CSS_LOAD_PATH ].concat(Rails.application.config.assets.paths).map { |path| "--load-path #{path}" }.join(" ")
16+
[ CSS_LOAD_PATH ].concat(Rails.application.config.assets.paths).map { |path| "--load-path #{Shellwords.escape(path)}" }.join(" ")
1717
end
1818

1919
def dartsass_compile_command

0 commit comments

Comments
 (0)