{"id":615,"date":"2021-02-07T18:30:24","date_gmt":"2021-02-08T00:30:24","guid":{"rendered":"https:\/\/n8williams.com\/devblog\/?p=615"},"modified":"2021-02-07T18:30:24","modified_gmt":"2021-02-08T00:30:24","slug":"error-local-a-invalid-option","status":"publish","type":"post","link":"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option","title":{"rendered":"local -A invalid option, the outdated bash A option issue"},"content":{"rendered":"\n<p>TL\/DR; Make sure your bash or shell program is up to date, with something like brew install bash. Especially if you are on a Mac, and have updated the OS recently.<\/p>\n\n\n\n<p>If you see this error: <code>local: -A: invalid option<\/code><\/p>\n\n\n\n<p>There are a number of things that may be triggering this. For me, it was an <code>asdf<\/code> install of an plugin for a new version of Node.js. Or in a nutshell, an issue trying to update my version of node.<\/p>\n\n\n\n<p>When I did some digging into the line of a node install util, I found there was a bash script that as calling something using an <code>-A<\/code> option in <code>lib\/utils.sh: line 35: local: -A: invalid option<\/code>.<\/p>\n\n\n\n<p>I was curious why <code>-A<\/code> would not work, and when I issued the command <code>bash --version,<\/code> from my shell it was a version from 2007! I can&#8217;t believe I have gotten away with using a 2007 shell for so long.<\/p>\n\n\n\n<p>The new Mac OS versions use zsh\/the Z shell, and one option is to use this. I did not heed Mac&#8217;s warning: <code>The default interactive shell is now zsh<\/code> &#8230; See: <a href=\"https:\/\/apple.stackexchange.com\/questions\/371997\/suppressing-the-default-interactive-shell-is-now-zsh-message-in-macos-catalina\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/apple.stackexchange.com\/questions\/371997\/suppressing-the-default-interactive-shell-is-now-zsh-message-in-macos-catalina<\/a><\/p>\n\n\n\n<p>As I use a lot of bash aliases, I was a bit wary of switching to the z shell, so I just made sure to install an updated version of bash using homebrew. I plan on looking into the Z shell sometime soon and maybe maybe the switch.  It appears there are some niceties to zsh vs bash. There are some great resources on making the switch, my favorite being: <a href=\"https:\/\/carlosroso.com\/the-right-way-to-migrate-your-bash-profile-to-zsh\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/carlosroso.com\/the-right-way-to-migrate-your-bash-profile-to-zsh\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>TL\/DR; Make sure your bash or shell program is up to date, with something like brew install bash. Especially if you are on a Mac, and have updated the OS recently. If you see this error: local: -A: invalid option There are a number of things that may be triggering this. For me, it was &hellip; <a href=\"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;local -A invalid option, the outdated bash A option issue&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.11 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>local -A invalid option, the outdated bash A option issue - The Dev Pages<\/title>\n<meta name=\"description\" content=\"TL\/DR; If you see this error: local: -A: invalid option, make sure your bash or shell program is up to date, with something like brew install bash. Especially if you are on a Mac, and have updated the OS recently.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"local -A invalid option, the outdated bash A option issue - The Dev Pages\" \/>\n<meta property=\"og:description\" content=\"TL\/DR; If you see this error: local: -A: invalid option, make sure your bash or shell program is up to date, with something like brew install bash. Especially if you are on a Mac, and have updated the OS recently.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option\" \/>\n<meta property=\"og:site_name\" content=\"The Dev Pages\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-08T00:30:24+00:00\" \/>\n<meta name=\"author\" content=\"Nate Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@admin\" \/>\n<meta name=\"twitter:site\" content=\"@admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nate Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option#article\",\"isPartOf\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option\"},\"author\":{\"name\":\"Nate Admin\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"headline\":\"local -A invalid option, the outdated bash A option issue\",\"datePublished\":\"2021-02-08T00:30:24+00:00\",\"dateModified\":\"2021-02-08T00:30:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option\"},\"wordCount\":254,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"articleSection\":[\"General Dev\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option\",\"url\":\"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option\",\"name\":\"local -A invalid option, the outdated bash A option issue - The Dev Pages\",\"isPartOf\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#website\"},\"datePublished\":\"2021-02-08T00:30:24+00:00\",\"dateModified\":\"2021-02-08T00:30:24+00:00\",\"description\":\"TL\/DR; If you see this error: local: -A: invalid option, make sure your bash or shell program is up to date, with something like brew install bash. Especially if you are on a Mac, and have updated the OS recently.\",\"breadcrumb\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/n8williams.com\/devblog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"local -A invalid option, the outdated bash A option issue\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#website\",\"url\":\"https:\/\/n8williams.com\/devblog\/\",\"name\":\"The Dev Pages\",\"description\":\"A knowledge base for web applications development (and beyond)\",\"publisher\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/n8williams.com\/devblog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\",\"name\":\"Nate Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g\",\"caption\":\"Nate Admin\"},\"logo\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/n8williams.com\",\"https:\/\/twitter.com\/admin\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"local -A invalid option, the outdated bash A option issue - The Dev Pages","description":"TL\/DR; If you see this error: local: -A: invalid option, make sure your bash or shell program is up to date, with something like brew install bash. Especially if you are on a Mac, and have updated the OS recently.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option","og_locale":"en_US","og_type":"article","og_title":"local -A invalid option, the outdated bash A option issue - The Dev Pages","og_description":"TL\/DR; If you see this error: local: -A: invalid option, make sure your bash or shell program is up to date, with something like brew install bash. Especially if you are on a Mac, and have updated the OS recently.","og_url":"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option","og_site_name":"The Dev Pages","article_published_time":"2021-02-08T00:30:24+00:00","author":"Nate Admin","twitter_card":"summary_large_image","twitter_creator":"@admin","twitter_site":"@admin","twitter_misc":{"Written by":"Nate Admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option#article","isPartOf":{"@id":"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option"},"author":{"name":"Nate Admin","@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"headline":"local -A invalid option, the outdated bash A option issue","datePublished":"2021-02-08T00:30:24+00:00","dateModified":"2021-02-08T00:30:24+00:00","mainEntityOfPage":{"@id":"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option"},"wordCount":254,"commentCount":0,"publisher":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"articleSection":["General Dev"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option#respond"]}]},{"@type":"WebPage","@id":"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option","url":"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option","name":"local -A invalid option, the outdated bash A option issue - The Dev Pages","isPartOf":{"@id":"https:\/\/n8williams.com\/devblog\/#website"},"datePublished":"2021-02-08T00:30:24+00:00","dateModified":"2021-02-08T00:30:24+00:00","description":"TL\/DR; If you see this error: local: -A: invalid option, make sure your bash or shell program is up to date, with something like brew install bash. Especially if you are on a Mac, and have updated the OS recently.","breadcrumb":{"@id":"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/n8williams.com\/devblog\/general_dev\/error-local-a-invalid-option#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/n8williams.com\/devblog\/"},{"@type":"ListItem","position":2,"name":"local -A invalid option, the outdated bash A option issue"}]},{"@type":"WebSite","@id":"https:\/\/n8williams.com\/devblog\/#website","url":"https:\/\/n8williams.com\/devblog\/","name":"The Dev Pages","description":"A knowledge base for web applications development (and beyond)","publisher":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/n8williams.com\/devblog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757","name":"Nate Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g","caption":"Nate Admin"},"logo":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/n8williams.com","https:\/\/twitter.com\/admin"]}]}},"_links":{"self":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/615"}],"collection":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/comments?post=615"}],"version-history":[{"count":1,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/615\/revisions"}],"predecessor-version":[{"id":616,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/615\/revisions\/616"}],"wp:attachment":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/media?parent=615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/categories?post=615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/tags?post=615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}