(path string, postStartCommand devcontainer.LifecycleScript)
| 1476 | } |
| 1477 | |
| 1478 | func createPostStartScript(path string, postStartCommand devcontainer.LifecycleScript) error { |
| 1479 | postStartScript, err := os.Create(path) |
| 1480 | if err != nil { |
| 1481 | return err |
| 1482 | } |
| 1483 | defer postStartScript.Close() |
| 1484 | |
| 1485 | if err := postStartScript.Chmod(0o755); err != nil { |
| 1486 | return err |
| 1487 | } |
| 1488 | |
| 1489 | if _, err := postStartScript.WriteString("#!/bin/sh\n\n" + postStartCommand.ScriptLines()); err != nil { |
| 1490 | return err |
| 1491 | } |
| 1492 | return nil |
| 1493 | } |
| 1494 | |
| 1495 | func newColor(value ...color.Attribute) *color.Color { |
| 1496 | c := color.New(value...) |
no test coverage detected