File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ function test_checkParameters_output_dir()
1616 cfg = checkParameters(cfg );
1717
1818 % test
19- if ~bids . internal . is_github_ci
19+ if ~isGithubCi
2020 cfg.dir.output = bids .internal .file_utils(cfg .dir .output , ' cpath' );
2121 assertEqual(cfg .dir .output , ...
2222 bids .internal .file_utils(fullfile(fileparts(mfilename(' fullpath' )), ...
@@ -152,3 +152,18 @@ function checkAllFields(cfg, expected)
152152function cfg = removeDirFieldForGithubAction(cfg )
153153 cfg = rmfield(cfg , ' dir' );
154154end
155+
156+ function [is_github , pth ] = isGithubCi()
157+ % (C) Copyright 2021 Remi Gau
158+ is_github = false ;
159+
160+ GITHUB_WORKSPACE = getenv(' HOME' );
161+
162+ if strcmp(GITHUB_WORKSPACE , ' /home/runner' )
163+
164+ is_github = true ;
165+ pth = GITHUB_WORKSPACE ;
166+
167+ end
168+
169+ end
You can’t perform that action at this time.
0 commit comments