Skip to content

Bootstrap headers not working (bare centeos) #324

@robert2411

Description

@robert2411

When I run a simple script with the bootstrap headers I get the folloing error:
./test.kts: line 6: exec: kscript: not found

I created a reproducable in docker

FROM centos
RUN yum install unzip -y
RUN yum install zip -y
WORKDIR /project
COPY ./test.kts /project
RUN chmod +x test.kts
RUN ./test.kts

the script

#!/bin/bash

//usr/bin/env echo '
/**** BOOTSTRAP kscript ****\'>/dev/null
command -v kscript >/dev/null 2>&1 || curl -L "https://git.io/fpF1K" | bash 1>&2
exec kscript $0 "$@"
\*** IMPORTANT: Any code including imports and annotations must come after this line ***/


println("Hello from Kotlin!")
for (arg in args) {
    println("arg: $arg")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions