Skip to content

Commit

Permalink
[Sass] Make sass-convert -F sass -T sass require --in-place
Browse files Browse the repository at this point in the history
Closes sassgh-137
  • Loading branch information
nex3 committed Apr 23, 2010
1 parent 98fcec7 commit 4f79e92
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc-src/SASS_CHANGELOG.md
Expand Up @@ -13,6 +13,12 @@ now allow whitespace before the colon. For example:
foo
color : blue

### Minor Changes

* Running `sass-convert --from sass --to sass` will raise an error
unless `--in-place` is provided,
to prevent accidental erasure of source files.

### Bug Fixes

* Variables are now allowed as arguments to `url()`.
Expand Down
5 changes: 5 additions & 0 deletions lib/haml/exec.rb
Expand Up @@ -666,6 +666,11 @@ def process_directory
end
@options[:output] ||= @options[:input]

if @options[:to] == @options[:from] && !@options[:in_place]
fmt = @options[:from]
raise "Error: converting from #{fmt} to #{fmt} without --in-place"
end

ext = @options[:from]
ext = :sass if ext == :sass2
Dir.glob("#{@options[:input]}/**/*.#{ext}") do |f|
Expand Down

0 comments on commit 4f79e92

Please sign in to comment.