[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/rbm][main] Bug 40064: Fix usage of exec without git_url/hg_url



Title: GitLab

richard pushed to branch main at The Tor Project / Applications / RBM

Commits:

  • 4fd67eea
    by Nicolas Vigier at 2023-11-08T08:51:23+01:00
    Bug 40064: Fix usage of exec without git_url/hg_url
    

2 changed files:

Changes:

  • doc/rbm_templates.asc
    ... ... @@ -107,7 +107,9 @@ exec::
    107 107
             considered to be a script, which will be written to a temporary
    
    108 108
             file and executed. The second argument of the exec function is
    
    109 109
             an optional $options hash, used to override values of 'git_url',
    
    110
    -        'hg_url', 'fetch', 'git_hash' or 'hg_hash'.
    
    110
    +        'hg_url', 'fetch', 'git_hash' or 'hg_hash'. If neither 'git_url'
    
    111
    +        nor 'hg_url' is set, the command is executed from the directory
    
    112
    +        where the 'rbm.conf' file is located.
    
    111 113
     
    
    112 114
     path::
    
    113 115
             A function to return an absolute path. It takes a path as first
    

  • lib/RBM.pm
    ... ... @@ -549,7 +549,7 @@ sub git_submodule_init_sync_update {
    549 549
     sub execute {
    
    550 550
         my ($project, $cmd, $options) = @_;
    
    551 551
         CORE::state %cache;
    
    552
    -    my $res_name;
    
    552
    +    my $res_name = '';
    
    553 553
         my $old_cwd = getcwd;
    
    554 554
         if (project_config($project, 'git_url', $options)) {
    
    555 555
             my $git_hash = project_config($project, 'git_hash', $options)
    
    ... ... @@ -571,6 +571,8 @@ sub execute {
    571 571
             my ($stdout, $stderr, $success, $exit_code)
    
    572 572
                     = capture_exec('hg', 'update', '-C', $hg_hash);
    
    573 573
             exit_error "Cannot checkout $hg_hash:\n$stderr" unless $success;
    
    574
    +    } else {
    
    575
    +        chdir($config->{basedir});
    
    574 576
         }
    
    575 577
         my ($stdout, $stderr, $success, $exit_code)
    
    576 578
                     = run_script($project, $cmd, \&capture_exec);
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits