File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -174,15 +174,21 @@ impl VersionEnv for GlobalEnvironment {
174174
175175impl GlobalEnvironment {
176176 pub fn from_current_dir ( ) -> DfxResult < GlobalEnvironment > {
177- let mut version = DFX_VERSION . to_owned ( ) ;
178-
179177 #[ cfg( debug_assertions) ]
180178 {
181179 // In debug, add a timestamp of the compilation at the end of version to ensure all
182180 // debug runs are unique (and cached uniquely).
183- version = version + "-" + env ! ( "DFX_TIMESTAMP_DEBUG_MODE_ONLY" ) ;
181+ return Ok ( GlobalEnvironment {
182+ version : format ! (
183+ "{}-{}" ,
184+ version,
185+ std:: env:: var_os( "DFX_TIMESTAMP_DEBUG_MODE_ONLY" ) . unwrap_or( "local-debug" )
186+ ) ,
187+ } ) ;
184188 }
185189
186- Ok ( GlobalEnvironment { version } )
190+ Ok ( GlobalEnvironment {
191+ version : DFX_VERSION . to_owned ( ) ,
192+ } )
187193 }
188194}
You can’t perform that action at this time.
0 commit comments