Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] config_provider.rb:1: syntax error, unexpected << #401

Open
black-snow opened this issue Oct 20, 2022 · 1 comment
Open

[BUG] config_provider.rb:1: syntax error, unexpected << #401

black-snow opened this issue Oct 20, 2022 · 1 comment

Comments

@black-snow
Copy link

black-snow commented Oct 20, 2022

After a brew upgrage:

Warning: Some installed formulae are not readable:
  aws-sam-cli: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/aws/homebrew-tap/ConfigProvider/config_provider.rb:1: syntax error, unexpected <<
<<<<<<< Updated upstream
^~
/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/aws/homebrew-tap/ConfigProvider/config_provider.rb:74: syntax error, unexpected ===, expecting end-of-input
=======
^~~

I don't see it in the repo but there's also no update for the formula coming in through brew.

Reinstall doesn't help.

@black-snow
Copy link
Author

File contents:

<<<<<<< Updated upstream
require 'json'

class ConfigProvider
    ##
    # Creates a ConfigProvider which helps in reading values from the bottle's config file
    # in the bottle-configs directory.
    # We are moving values to json file so that it is easy to modify them by bot

    CONFIG_DIR = File.join(File.dirname(__FILE__), "..", "bottle-configs")

    def initialize(name, config_file_path=nil)
        unless config_file_path.nil?
            file = File.read(config_file_path)
        else
            file = File.read(File.join(CONFIG_DIR, "#{name.downcase}.json"))
        end

        @config_data = JSON.parse(file)
    end

    def name
        @config_data['name']
    end

    def version
        @config_data['version']
    end

    def bin
        @config_data['bin']
    end

    def url
        @config_data['url']
    end

    def sha256
        @config_data['sha256']
    end

    def root_url
        @config_data['bottle']['root_url']
    end

    def sierra_hash
        @config_data['bottle']['sha256']['sierra']
    end

    def arm64_big_sur_hash
        @config_data['bottle']['sha256']['arm64_big_sur']
    end

    def linux_hash
        @config_data['bottle']['sha256']['linux']
    end

    def linux_arm_hash
        @config_data['bottle']['sha256']['linux_arm']
    end

    def native_root_url
        @config_data['native']['root_url']
    end

    def native_linux_x86_file
        @config_data['native']['linux_x86']['file']
    end

    def native_linux_x86_hash
        @config_data['native']['linux_x86']['sha256']
    end
end
=======
require 'json'

class ConfigProvider
    ##
    # Creates a ConfigProvider which helps in reading values from the bottle's config file
    # in the bottle-configs directory.
    # We are moving values to json file so that it is easy to modify them by bot

    CONFIG_DIR = File.join(File.dirname(__FILE__), "..", "bottle-configs")

    def initialize(name, config_file_path=nil)
        unless config_file_path.nil?
            file = File.read(config_file_path)
        else
            file = File.read(File.join(CONFIG_DIR, "#{name.downcase}.json"))
        end

        @config_data = JSON.parse(file)
    end

    def name
        @config_data['name']
    end

    def version
        @config_data['version']
    end

    def bin
        @config_data['bin']
    end

    def url
        @config_data['url']
    end

    def sha256
        @config_data['sha256']
    end

    def root_url
        @config_data['bottle']['root_url']
    end

    def sierra_hash
        @config_data['bottle']['sha256']['sierra']
    end

    def arm64_big_sur_hash
        @config_data['bottle']['sha256']['arm64_big_sur']
    end

    def linux_hash
        @config_data['bottle']['sha256']['linux']
    end

    def linux_arm_hash
        @config_data['bottle']['sha256']['linux_arm']
    end
end
>>>>>>> Stashed changes

Looks like some merg conflict letf-overs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant