Sass 如何用“重写只读文件”;罗盘编译“;指挥部?

Sass 如何用“重写只读文件”;罗盘编译“;指挥部?,sass,file-permissions,compass-sass,Sass,File Permissions,Compass Sass,我发现MS Visual Studio web项目文件夹来自TFS服务器,其中包含多个*.scss文件,并且已经生成了*.css(由Mindscape web Workbench Visual Studio插件生成) 发布之前,站点希望使用Compass重新生成*.css文件。 但是文件*.css文件包含在项目中并签入,所以它们被标记为只读文件属性 我的命令行: C:\Ruby193\bin>compass compile --force --sass-dir 'd:\SDes

我发现MS Visual Studio web项目文件夹来自TFS服务器,其中包含多个*.scss文件,并且已经生成了*.css(由Mindscape web Workbench Visual Studio插件生成)

发布之前,站点希望使用Compass重新生成*.css文件。
但是文件*.css文件包含在项目中并签入,所以它们被标记为只读文件属性

我的命令行:

C:\Ruby193\bin>compass compile
   --force
   --sass-dir 'd:\SDesign'
   --css-dir 'd:\SDesign' 
   --output-style compressed
   --no-line-comments
   --relative-assets
   --trace
结果如下:

overwrite Style.css
Errno::EACCES on line ["56"] of C: Permission denied - d:/SDesign/Style.css
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/actions.rb:56:in `open'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/actions.rb:56:in `write_file'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:144:in `compile'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:118:in `compile_if_required'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:103:in `block (2 levels) in run'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:101:in `each'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:101:in `block in run'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:126:in `timed'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:100:in `run'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/update_project.rb:45:in `perform'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/base.rb:18:in `execute'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/project_base.rb:19:in `execute'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/exec/sub_command_ui.rb:15:in `run!'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/bin/compass:29:in `block in <top (required)>'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/bin/compass:43:in `call'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/bin/compass:43:in `<top (required)>'
  C:/Ruby193/bin/compass:19:in `load'
  C:/Ruby193/bin/compass:19:in `<main>'
overwrite Style.css
错误号::C的第[“56”]行上的EACCES:权限被拒绝-d:/SDesign/Style.css
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/actions.rb:56:in'open'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/actions.rb:56:in'write_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:144:in'compile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:118:在“需要时编译”中
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:103:在“运行中的块(2级)”中
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:101:in'each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:101:in'block in run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:126:in'timed'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/compiler.rb:100:in'run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/update_project.rb:45:in'perform'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/base.rb:18:in'execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/project_base.rb:19:in'execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/exec/sub_命令_ui.rb:43:in'perform!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/lib/compass/exec/sub_命令_ui.rb:15:in'run!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/bin/compass:29:in'block in'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/bin/compass:43:in'call'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.1/bin/compass:43:in`'
C:/Ruby193/箱子/罗盘:19:在“装载”中
C:/Ruby193/bin/compass:19:in`'
有没有办法不手动重置目标*.css文件中的只读属性?
也许是一些神奇的命令参数


提前谢谢。

这是我的临时解决方案。
如果你更懂路,请告诉我

@echo off
set ruby_bin=c:\Ruby193\bin
set project_path=d:\CDesign
set temp_path=%project_path%\temp

if exist "%temp_path%" rd "%temp_path%" /Q /S
mkdir "%temp_path%"

call %ruby_bin%\compass.bat compile --force --sass-dir '%project_path%' --css-dir '%temp_path%' --output-style compressed --no-line-comments --relative-assets

xcopy %temp_path%\*.* %project_path% /S /R /Y
rd "%temp_path%" /Q /S