havardh / workflow

Workflow-centric workspace manager
154 stars 9 forks source link

The wrong arguments are passed into the flow transformation step. #108

Open havardh opened 6 years ago

havardh commented 6 years ago

The workflow-parser-arguments does not parse positional arguments correctly. The first argument passed along is the name of the flow file which is being resolved. This argument should not be included.

How to reproduce

flow file

import React from "react";
import render, {Workspace, requireComponent} from "workflow-react";

const {Terminal} = requireComponent("workflow-apps-defaults");

export default render(
  <Workspace name="workflow-parser-arguments-bug" args={["arg1"]}>
    <Terminal cmd={({arg1]} => `echo ${arg1}`} />
  </Workspace>
);

command line

workflow WorkflowParserArgumentsBug.js argument-number-1

Actual

The flow opens a terminal which echos 'WorkflowParserArgumentsBug.js'.

Expected

The flow should open a terminal which echos 'argument-number-1'

havardh commented 5 years ago

This issue is resolved by the new command argument parser, workflow-parser-arguments should be deprecated.