Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix root location when repacking application #450

Merged
merged 1 commit into from
May 3, 2024
Merged

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented May 3, 2024

fixes #442

Explaination (see root directory)

Default behavior (without phar)

>/tmp/foobar/castor-phar-location(main *%) castor debug
 ---------------------- ------------------------------------------------------------- 
  Application name       castor                                                       
  Application version    v0.15.0                                                      
  Root directory         /tmp/foobar/castor-phar-location                             
  Cache directory        /home/gregoire/.cache/castor                                 
  Current context name                                                                
  Current context data   {                                                            
                             "name": "",                                              
                             "data": [],                                              
                             "environment": [],                                       
                             "workingDirectory": "/tmp/foobar/castor-phar-location",  
                             "tty": false,                                            
                             "pty": true,                                             
                             "timeout": null,                                         
                             "quiet": false,                                          
                             "allowFailure": false,                                   
                             "notify": null,                                          
                             "verbosityLevel": -1,                                    
                             "notificationTitle": ""                                  
                         }                                                            
 ---------------------- ------------------------------------------------------------- 

Without my patch, and with the phar

>/tmp/foobar/castor-phar-location(main *%) ./my-app.linux.phar  debug
 ---------------------- ---------------------------------------- 
  Application name       castor                                  
  Application version    v0.15.0                                 
  Root directory         /tmp/foobar                             
  Cache directory        /home/gregoire/.cache/castor            
  Current context name                                           
  Current context data   {                                       
                             "name": "",                         
                             "data": [],                         
                             "environment": [],                  
                             "workingDirectory": "/tmp/foobar",  
                             "tty": false,                       
                             "pty": true,                        
                             "timeout": null,                    
                             "quiet": false,                     
                             "allowFailure": false,              
                             "notify": false,                    
                             "verbosityLevel": -1                
                         }                                       
 ---------------------- ---------------------------------------- 

Why my patch, and with the phar

>/tmp/foobar/castor-phar-location(main *%) ./my-app.linux.phar  debug
 ---------------------- ------------------------------------------------------------- 
  Application name       castor                                                       
  Application version    v0.15.0                                                      
  Root directory         /tmp/foobar/castor-phar-location                             
  Cache directory        /home/gregoire/.cache/castor                                 
  Current context name                                                                
  Current context data   {                                                            
                             "name": "",                                              
                             "data": [],                                              
                             "environment": [],                                       
                             "workingDirectory": "/tmp/foobar/castor-phar-location",  
                             "tty": false,                                            
                             "pty": true,                                             
                             "timeout": null,                                         
                             "quiet": false,                                          
                             "allowFailure": false,                                   
                             "notify": false,                                         
                             "verbosityLevel": -1                                     
                         }                                                            
 ---------------------- ------------------------------------------------------------- 

Copy link
Member

@pyrech pyrech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@pyrech pyrech merged commit 54a1c19 into main May 3, 2024
9 checks passed
@pyrech pyrech deleted the dot-env-and-phar branch May 3, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using .env files with phar file
2 participants