Skip to content

setup.sh: macOS sed Command Broken #5

@ghost

Description

I cloned main to follow along with https://www.coursera.org/learn/foundations-of-red-hat-cloud-native-development/

Upon cd'ing into DO100x-apps/setup/macos and invoking bash ./setup.sh, I received the following error message:

Creating namespace 'mitch-dev' ...
Creating namespace 'mitch-stage' ...
Creating certificates ...
Creating Kubectl credentials for 'mitch' ...
Creating Kubectl context 'mitch-context' for user 'mitch' ...
Creating role resources for user 'mitch' in namespace 'mitch-dev' ...
sed: /Users/<snip>/DO100x-apps/setup/macos/files/role-binding.yml: No such file or directory
Could not apply security resources

This appears to be correct: the files directory is a macos sibling directory, not a child directory.

A temporary workaround is throwing a ".." in front of the /files bit of the path that sed is looking for:

86     if ! sed "s/{username}/${USERNAME}/g; s/{namespace}/${1}/g" $SCRIPTPATH/../files/role-binding.yml | kubectl apply -f -  > /dev/null 2>&1 ; then

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