mfoemmel / fig

Fig is a utility for configuring environments and managing dependencies across a team of developers.
Other
81 stars 13 forks source link

Running fig w/o first running "fig -u" throws file not found exception, if package.fig is present #35

Closed walquis closed 12 years ago

walquis commented 14 years ago

This is true for both Windows and Linux.

C:\src\git\anthillpro_agent_installer_win>cat package.fig
config default
   include java-zipped/1.6.0.13
   include ruby-zipped-win/1.8.6.287
   include anthillpro-agent/3.7.1.53990
end

C:\src\git\anthillpro_agent_installer_win>fig
C:/Progra~1/AntHillPro3/ruby/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/repository.rb:133:in `read_package_from_directory': File not
found: C:/Documents and Settings/cwalquist/.fighome/repos/java-zipped/1.6.0.13/package.fig (RuntimeError)
        from C:/Progra~1/AntHillPro3/ruby/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/repository.rb:118:in `read_local_package'
        from C:/Progra~1/AntHillPro3/ruby/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/repository.rb:100:in `load_package'
        from C:/Progra~1/AntHillPro3/ruby/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/environment.rb:121:in `lookup_package'
        from C:/Progra~1/AntHillPro3/ruby/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/environment.rb:73:in `include_config'
        from C:/Progra~1/AntHillPro3/ruby/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/environment.rb:64:in `apply_config_statement'
        from C:/Progra~1/AntHillPro3/ruby/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/environment.rb:35:in `apply_config'
        from C:/Progra~1/AntHillPro3/ruby/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/environment.rb:35:in `each'
        from C:/Progra~1/AntHillPro3/ruby/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/environment.rb:35:in `apply_config'
        from C:/Progra~1/AntHillPro3/ruby/lib/ruby/gems/1.8/gems/fig-0.1.13/bin/fig:134
        from C:/PROGRA~1/AntHillPro3/ruby/bin/fig:19:in `load'
        from C:/PROGRA~1/AntHillPro3/ruby/bin/fig:19

C:\src\git\anthillpro_agent_installer_win>fig -u
downloading ftp://devnas/builds/Fig/repos/java-zipped/1.6.0.13/.fig
downloading ftp://devnas/builds/Fig/repos/java-zipped/1.6.0.13/resources.tar.gz
downloading ftp://devnas/builds/Fig/repos/ruby-zipped-win/1.8.6.287/.fig
downloading ftp://devnas/builds/Fig/repos/ruby-zipped-win/1.8.6.287/resources.tar.gz
downloading ftp://devnas/builds/Fig/repos/anthillpro-agent/3.7.1.53990/.fig
downloading ftp://devnas/builds/Fig/repos/anthillpro-agent/3.7.1.53990/resources.tar.gz

C:\src\git\anthillpro_agent_installer_win>fig
C:\src\git\anthillpro_agent_installer_win>
[buildadmin@sud-chibld01 ahp_installer_linux]$ rm -rf ~/.fighome/repos/java-tgzipped/
[buildadmin@sud-chibld01 ahp_installer_linux]$ fig
/site/apps/ruby-1.8.6/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/repository.rb:133:in `read_package_from_directory': File not found: /home/buildadmin/.fighome/repos/java-tgzipped/1.6.0.11/package.fig (RuntimeError)
        from /site/apps/ruby-1.8.6/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/repository.rb:118:in `read_local_package'
        from /site/apps/ruby-1.8.6/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/repository.rb:100:in `load_package'
        from /site/apps/ruby-1.8.6/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/environment.rb:121:in `lookup_package'
        from /site/apps/ruby-1.8.6/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/environment.rb:73:in `include_config'
        from /site/apps/ruby-1.8.6/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/environment.rb:64:in `apply_config_statement'
        from /site/apps/ruby-1.8.6/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/environment.rb:35:in `apply_config'
        from /site/apps/ruby-1.8.6/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/environment.rb:35:in `each'
        from /site/apps/ruby-1.8.6/lib/ruby/gems/1.8/gems/fig-0.1.13/lib/fig/environment.rb:35:in `apply_config'
        from /site/apps/ruby-1.8.6/lib/ruby/gems/1.8/gems/fig-0.1.13/bin/fig:134
        from /site/apps/ruby/bin/fig:19:in `load'
        from /site/apps/ruby/bin/fig:19
[buildadmin@sud-chibld01 ahp_installer_linux]$ fig -u
downloading ftp://devnas/Builds/Fig/repos/java-tgzipped/1.6.0.11/.fig
downloading ftp://devnas/Builds/Fig/repos/java-tgzipped/1.6.0.11/resources.tar.gz
[buildadmin@sud-chibld01 ahp_installer_linux]$ fig
[buildadmin@sud-chibld01 ahp_installer_linux]$
walquis commented 12 years ago

Fig now says "nothing to do" if run with no args (whether or not package.fig exists).