question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bootstrap headers not working (bare centeos)

See original GitHub issue

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")
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
wusealcommented, Nov 1, 2021

I advice change the bootstrapheader to next:

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

Ref: https://stackoverflow.com/questions/10520605/bashs-source-command-not-working-with-a-file-curld-from-internet I’v test it, It works fine. How do you think @holgerbrandl

0reactions
holgerbrandlcommented, Nov 7, 2021

Thanks for the fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

navbar collapse not working in bootstrap - Stack Overflow
My geuss is that you didn't load jQuery. Place this in your header and see if it works: <script src="http://code.jquery.com/jquery-latest.min.js" ...
Read more >
Troubleshooting installations | OpenShift Container Platform 4.8
The bootstrap machine adds OpenShift Container Platform components into the production control plane. ... 1, The -I option returns the header only.
Read more >
Navbar - Bootstrap
Documentation and examples for Bootstrap's powerful, responsive navigation header, the navbar. Includes support for branding, navigation, and more, ...
Read more >
Installing a user-provisioned bare metal cluster on a restricted ...
Completing this test installation might make it easier to isolate and troubleshoot any issues that might arise during your installation in a restricted...
Read more >
Container Recipes — Singularity container 2.6 documentation
Header ¶ · Bootstrap : references the kind of base you want to use (e.g., docker, debootstrap, shub). For example, a shub bootstrap...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found