Unverified Commit 4fd67eea authored by boklm's avatar boklm
Browse files

Bug 40064: Fix usage of exec without git_url/hg_url

parent 0a47c75f
Loading
Loading
Loading
Loading
+3 −1
Changes for doc/rbm_templates.asc: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -107,7 +107,9 @@ exec::
        considered to be a script, which will be written to a temporary
        file and executed. The second argument of the exec function is
        an optional $options hash, used to override values of 'git_url',
        'hg_url', 'fetch', 'git_hash' or 'hg_hash'.
        'hg_url', 'fetch', 'git_hash' or 'hg_hash'. If neither 'git_url'
        nor 'hg_url' is set, the command is executed from the directory
        where the 'rbm.conf' file is located.

path::
        A function to return an absolute path. It takes a path as first
+3 −1
Changes for lib/RBM.pm: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -549,7 +549,7 @@ sub git_submodule_init_sync_update {
sub execute {
    my ($project, $cmd, $options) = @_;
    CORE::state %cache;
    my $res_name;
    my $res_name = '';
    my $old_cwd = getcwd;
    if (project_config($project, 'git_url', $options)) {
        my $git_hash = project_config($project, 'git_hash', $options)
@@ -571,6 +571,8 @@ sub execute {
        my ($stdout, $stderr, $success, $exit_code)
                = capture_exec('hg', 'update', '-C', $hg_hash);
        exit_error "Cannot checkout $hg_hash:\n$stderr" unless $success;
    } else {
        chdir($config->{basedir});
    }
    my ($stdout, $stderr, $success, $exit_code)
                = run_script($project, $cmd, \&capture_exec);