Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ class CmdRun extends CmdBase implements HubOptions {
/*
* try to look for a pipeline in the repository
*/
def manager = new AssetManager(pipelineName, this)
def manager = new AssetManager(pipelineName, mainScript, this)
def repo = manager.getProject()

boolean checkForUpdate = true
Expand Down
16 changes: 14 additions & 2 deletions modules/nextflow/src/main/groovy/nextflow/scm/AssetManager.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ class AssetManager {
build(pipelineName, config, cliOpts)
}

AssetManager( String pipelineName, String scriptFile, HubOptions cliOpts = null) {
assert pipelineName
// read the default config file (if available)
def config = ProviderConfig.getDefault()
// build the object
build(pipelineName, config, cliOpts, scriptFile)
}

AssetManager( String pipelineName, Map config ) {
assert pipelineName
// build the object
Expand All @@ -121,10 +129,11 @@ class AssetManager {
* @return The {@link AssetManager} object itself
*/
@PackageScope
AssetManager build( String pipelineName, Map config = null, HubOptions cliOpts = null ) {
AssetManager build( String pipelineName, Map config = null, HubOptions cliOpts = null, String scriptFile = null) {

this.providerConfigs = ProviderConfig.createFromMap(config)

if( scriptFile )
this.mainScript = scriptFile
this.project = resolveName(pipelineName)
this.localPath = checkProjectDir(project)
this.hub = checkHubProvider(cliOpts)
Expand Down Expand Up @@ -311,6 +320,9 @@ class AssetManager {
if( !isUrl )
return null

if( repository.endsWith('.nf') || repository.endsWith('.nxf') )
throw new AbortOperationException("Repository URL can end as a script file (.nf|.nxf) - Use -main-script option.")

try {
def url = new GitUrl(repository)

Expand Down
Loading