https://bioinformaticsworkbook.org/dataAnalysis/nextflow/02_creatingAworkflow.html#gsc.tab=0
#install nextflow
Open terminal wget -qO- https://get.nextflow.io | bash moves the executable to your PATH. Note /usr/local/bin is the default for MacOS sudo mv nextflow /usr/local/bin
Tried second commit