{"id":1068,"date":"2017-06-19T21:43:55","date_gmt":"2017-06-20T04:43:55","guid":{"rendered":"http:\/\/breanneboland.com\/blog\/?p=1068"},"modified":"2019-02-25T14:22:20","modified_gmt":"2019-02-25T22:22:20","slug":"pipefail-bail-add-or-remove-set-dash-u","status":"publish","type":"post","link":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/","title":{"rendered":"Pipefail Bail: When to Add (or Remove) set -u"},"content":{"rendered":"<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1072\" src=\"http:\/\/breanneboland.com\/wp-content\/uploads\/2017\/06\/826960f478bd627a9ab4e6037ad33f14.jpg\" alt=\"\" width=\"570\" height=\"464\" srcset=\"https:\/\/breanneboland.com\/wp-content\/uploads\/2017\/06\/826960f478bd627a9ab4e6037ad33f14.jpg 570w, https:\/\/breanneboland.com\/wp-content\/uploads\/2017\/06\/826960f478bd627a9ab4e6037ad33f14-300x244.jpg 300w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/>The scene: I was going back to a set of 18-month-old Packer files to add <\/span><em><span style=\"font-weight: 400;\">set -eux -o pipefail<\/span><\/em><span style=\"font-weight: 400;\"> to each file in the build. (If you\u2019re not familiar with this command and its uses, <a href=\"http:\/\/redsymbol.net\/articles\/unofficial-bash-strict-mode\/\" target=\"_blank\" rel=\"noopener noreferrer\">here\u2019s<\/a> where I learned about it. Highly recommended.) I\u2019d recently had a two-day time sink, wherein I couldn\u2019t get LDAP access to work on our CI\/CD, and eventually I found that the shell script that adds our LDAP certs had coughed and died midway through without Packer erroring out and letting me know that something was wrong. LDAP failure is a pretty common sign that something is wrong with our CI\/CD, but in the past it\u2019s been due to more exotic problems than Packer petering out. Pipefail isn\u2019t necessarily the right tool for every job, but I wanted to spare my future self these issues, where VERY SIGNIFICANT PROBLEMS might otherwise be buried in a billion screens of Packer output.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">(Yes, I\u2019ll still look at the credentials folder first next time.)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">That was how I learned that Packer scripts can fail, but the build can still complete. This surprised me, considering how many failed builds I experienced when I was first working with Packer. So now I\u2019m working through each script, finding quiet problems (such as unnecessary symbolic links being created during the installation of our version of Java) and other issues that perhaps aren\u2019t problems today but may arise like the kraken later to take its accumulated revenge. Like I said, these scripts have been in use for about a year and a half, building AMIs at least once a month. Usually, only the base AMI changes, and the only other alterations have been additions &#8211; this version of Ruby that one dev team needs, this package for another group. Beyond that, it\u2019s been pretty steady, which means a fair amount of time has passed since any kind of in-depth review of these files. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Pipefail is a great and rather educational way to work through your scripts, but on a recent day of this little side project, I encountered a surprising problem. In one of the scripts, PATH is augmented, followed by <\/span><em><span style=\"font-weight: 400;\">source \/etc\/bashrc<\/span><\/em><span style=\"font-weight: 400;\">. This is when the file errored out, with a gasp of \u00a0<\/span><em><span style=\"font-weight: 400;\">amazon-ebs: \/etc\/bashrc: line 12: PS1: unbound variable<\/span><\/em><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">What in the what? <\/span><\/p>\n<p><span style=\"font-weight: 400;\">I did some googling for this <\/span><span style=\"font-weight: 400;\">unbound variable <\/span><span style=\"font-weight: 400;\">business, but the results didn\u2019t apply to what I was doing. I wasn\u2019t failing to create <\/span><em><span style=\"font-weight: 400;\">$youMessedUp<\/span><\/em><span style=\"font-weight: 400;\">. <\/span><em><span style=\"font-weight: 400;\">\/etc\/bashrc<\/span><\/em><span style=\"font-weight: 400;\"> did indeed exist in the Packer Build instance, which I confirmed by, variously, <em>touch <\/em><\/span><em><span style=\"font-weight: 400;\">\/etc\/bashrc<\/span><\/em><span style=\"font-weight: 400;\">, <\/span><em><span style=\"font-weight: 400;\">ls -a \/etc | grep bashrc<\/span><\/em><span style=\"font-weight: 400;\">, and <\/span><em><span style=\"font-weight: 400;\">cat \/etc\/bashrc<\/span><\/em><span style=\"font-weight: 400;\">, at various times in my troubleshooting. The <\/span><em><span style=\"font-weight: 400;\">source<\/span><\/em><span style=\"font-weight: 400;\"> command was being used correctly. And there were exactly no variables in that script. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Huh. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">But <\/span><em><span style=\"font-weight: 400;\">\/etc\/bashrc<\/span><\/em><span style=\"font-weight: 400;\"> was a robust file, quite lengthy compared to the most familiar file of its type in my life, the <\/span><em><span style=\"font-weight: 400;\">~\/.bashrc<\/span><\/em><span style=\"font-weight: 400;\">\u00a0on my own machine. There was a lot going on in there\u2026 including variables. And because of the kinds of AMIs I use on this project &#8211; that is, AMIs built by a different team I have little contact with, issued every month without exhausting notes on what might have changed from the last version &#8211; any alteration I might have made that day might be useless or, worse, damaging when applied blindly next month. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Shit. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Beyond that, there was the issue of scope. This pipefail project was supposed to be about controlling <\/span><i><span style=\"font-weight: 400;\">my <\/span><\/i><span style=\"font-weight: 400;\">end of things. Faulty machine images and limited control are just part of my job. I\u2019ve dealt with said images, but the dealing is not typically dont in shell scripts. Usually, if it\u2019s something especially sticky, the job becomes one of communication, wherein I document what\u2019s up and reach out to the agency in charge of regular base AMI creation so we can sort things out. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">So that resolution and realization was where <\/span><em><span style=\"font-weight: 400;\">set +u<\/span><\/em><span style=\"font-weight: 400;\"> came in.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">I have an ongoing concern that shortcuts that I think are efficient might be unhelpful cheating, especially in this particular phase of my career. I ran my error and my situation by a few more senior engineers at my job. The idea of <\/span><em><span style=\"font-weight: 400;\">set +u<\/span><\/em><span style=\"font-weight: 400;\"> came up. And said seniors confirmed that this was just wise and not laziness. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">So: <\/span><\/p>\n<p style=\"padding-left: 30px;\"><em><span style=\"font-weight: 400;\">set +u<\/span><\/em><\/p>\n<p style=\"padding-left: 30px;\"><em><span style=\"font-weight: 400;\">source \/etc\/bashrc<\/span><\/em><\/p>\n<p style=\"padding-left: 30px;\"><em><span style=\"font-weight: 400;\">set -u<\/span><\/em><\/p>\n<p><span style=\"font-weight: 400;\">That is, repeating the command at the top of the page. <\/span><em><span style=\"font-weight: 400;\">+u<\/span><\/em><span style=\"font-weight: 400;\"> reverses that initial <\/span><em><span style=\"font-weight: 400;\">-u<\/span><\/em><span style=\"font-weight: 400;\"> flag, which ends the script when an unbound variable happens. For that one line, only\u00a0<em>set -ex -o pipefail<\/em> is in play, minus that situationally unfortunate\u00a0<em>-u<\/em>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This is useful if you have a weird situation like mine, where you need to run bash strict mode most of the time but have a line or a section of a script that deals with a resource that\u2019s out of your control (but which you can still trust). Other times this is useful is if you\u2019re activating a virtualenv in Python. In that case, <em>set -u<\/em> may be best set aside for that particular endeavor. In short, if your script is opening a big bucket of things out of your control (<\/span><em><span style=\"font-weight: 400;\">\/etc\/bashrc<\/span><\/em><span style=\"font-weight: 400;\">, the contents of an <\/span><em><span style=\"font-weight: 400;\">\/env\/bin\/activate<\/span><\/em><em style=\"font-weight: 400;\"> folder<\/em>), and you want to go full <em>set -eux -o\u00a0pipefail <\/em>otherwise,\u00a0pop a little <em>set<\/em>\u00a0<em><span style=\"font-weight: 400;\">+u\u00a0<\/span><\/em><span style=\"font-weight: 400;\">in there<\/span><span style=\"font-weight: 400;\">. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">But, this specific little situation aside, I\u2019ve become a convert for <\/span><em><span style=\"font-weight: 400;\">set -eux -o pipefail<\/span><\/em><span style=\"font-weight: 400;\"> on my Packer builds for sure and will probably keep the habit when I&#8217;m in a situation where I&#8217;m using AMIs not made by an outside team. The more you know, right?\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The scene: I was going back to a set of 18-month-old Packer files to add set -eux -o pipefail to each file in the build. (If you\u2019re not familiar with this command and its uses, here\u2019s where I learned about it. Highly recommended.) I\u2019d recently had a two-day time sink, wherein I couldn\u2019t get LDAP &hellip; <a href=\"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Pipefail Bail: When to Add (or Remove) set -u<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[219],"tags":[234,233,235,236],"class_list":["post-1068","post","type-post","status-publish","format-standard","hentry","category-how-to","tag-bash","tag-dear-past-self","tag-packer","tag-troubleshooting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Pipefail Bail: When to Add (or Remove) set -u - Breanne Boland<\/title>\n<meta name=\"description\" content=\"In which set -eux -o pipefail turns out to be a little much for one line of a Packer build (and how to tell when that&#039;s the case).\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pipefail Bail: When to Add (or Remove) set -u - Breanne Boland\" \/>\n<meta property=\"og:description\" content=\"In which set -eux -o pipefail turns out to be a little much for one line of a Packer build (and how to tell when that&#039;s the case).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/\" \/>\n<meta property=\"og:site_name\" content=\"Breanne Boland\" \/>\n<meta property=\"article:published_time\" content=\"2017-06-20T04:43:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-02-25T22:22:20+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/breanneboland.com\/wp-content\/uploads\/2017\/06\/826960f478bd627a9ab4e6037ad33f14.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/2017\\\/06\\\/19\\\/pipefail-bail-add-or-remove-set-dash-u\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/2017\\\/06\\\/19\\\/pipefail-bail-add-or-remove-set-dash-u\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/#\\\/schema\\\/person\\\/7b8ba109de56e2b80e0773753109c1ce\"},\"headline\":\"Pipefail Bail: When to Add (or Remove) set -u\",\"datePublished\":\"2017-06-20T04:43:55+00:00\",\"dateModified\":\"2019-02-25T22:22:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/2017\\\/06\\\/19\\\/pipefail-bail-add-or-remove-set-dash-u\\\/\"},\"wordCount\":960,\"publisher\":{\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/#\\\/schema\\\/person\\\/7b8ba109de56e2b80e0773753109c1ce\"},\"image\":{\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/2017\\\/06\\\/19\\\/pipefail-bail-add-or-remove-set-dash-u\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/breanneboland.com\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/826960f478bd627a9ab4e6037ad33f14.jpg\",\"keywords\":[\"bash\",\"dear past self\",\"packer\",\"troubleshooting\"],\"articleSection\":[\"How to\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/2017\\\/06\\\/19\\\/pipefail-bail-add-or-remove-set-dash-u\\\/\",\"url\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/2017\\\/06\\\/19\\\/pipefail-bail-add-or-remove-set-dash-u\\\/\",\"name\":\"Pipefail Bail: When to Add (or Remove) set -u - Breanne Boland\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/2017\\\/06\\\/19\\\/pipefail-bail-add-or-remove-set-dash-u\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/2017\\\/06\\\/19\\\/pipefail-bail-add-or-remove-set-dash-u\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/breanneboland.com\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/826960f478bd627a9ab4e6037ad33f14.jpg\",\"datePublished\":\"2017-06-20T04:43:55+00:00\",\"dateModified\":\"2019-02-25T22:22:20+00:00\",\"description\":\"In which set -eux -o pipefail turns out to be a little much for one line of a Packer build (and how to tell when that's the case).\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/2017\\\/06\\\/19\\\/pipefail-bail-add-or-remove-set-dash-u\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/breanneboland.com\\\/blog\\\/2017\\\/06\\\/19\\\/pipefail-bail-add-or-remove-set-dash-u\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/2017\\\/06\\\/19\\\/pipefail-bail-add-or-remove-set-dash-u\\\/#primaryimage\",\"url\":\"http:\\\/\\\/breanneboland.com\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/826960f478bd627a9ab4e6037ad33f14.jpg\",\"contentUrl\":\"http:\\\/\\\/breanneboland.com\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/826960f478bd627a9ab4e6037ad33f14.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/2017\\\/06\\\/19\\\/pipefail-bail-add-or-remove-set-dash-u\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Pipefail Bail: When to Add (or Remove) set -u\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/\",\"name\":\"Breanne Boland\",\"description\":\"Appsec engineer, SRE, writer, UX, endless questions mostly\",\"publisher\":{\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/#\\\/schema\\\/person\\\/7b8ba109de56e2b80e0773753109c1ce\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/breanneboland.com\\\/blog\\\/#\\\/schema\\\/person\\\/7b8ba109de56e2b80e0773753109c1ce\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/764113b6dca6b6cee982a9f690f5c44d6166de3996e918649e2bafb27cd4c8bf?s=96&d=blank&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/764113b6dca6b6cee982a9f690f5c44d6166de3996e918649e2bafb27cd4c8bf?s=96&d=blank&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/764113b6dca6b6cee982a9f690f5c44d6166de3996e918649e2bafb27cd4c8bf?s=96&d=blank&r=g\",\"caption\":\"admin\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/764113b6dca6b6cee982a9f690f5c44d6166de3996e918649e2bafb27cd4c8bf?s=96&d=blank&r=g\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pipefail Bail: When to Add (or Remove) set -u - Breanne Boland","description":"In which set -eux -o pipefail turns out to be a little much for one line of a Packer build (and how to tell when that's the case).","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:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/","og_locale":"en_US","og_type":"article","og_title":"Pipefail Bail: When to Add (or Remove) set -u - Breanne Boland","og_description":"In which set -eux -o pipefail turns out to be a little much for one line of a Packer build (and how to tell when that's the case).","og_url":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/","og_site_name":"Breanne Boland","article_published_time":"2017-06-20T04:43:55+00:00","article_modified_time":"2019-02-25T22:22:20+00:00","og_image":[{"url":"http:\/\/breanneboland.com\/wp-content\/uploads\/2017\/06\/826960f478bd627a9ab4e6037ad33f14.jpg","type":"","width":"","height":""}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/#article","isPartOf":{"@id":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/"},"author":{"name":"admin","@id":"https:\/\/breanneboland.com\/blog\/#\/schema\/person\/7b8ba109de56e2b80e0773753109c1ce"},"headline":"Pipefail Bail: When to Add (or Remove) set -u","datePublished":"2017-06-20T04:43:55+00:00","dateModified":"2019-02-25T22:22:20+00:00","mainEntityOfPage":{"@id":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/"},"wordCount":960,"publisher":{"@id":"https:\/\/breanneboland.com\/blog\/#\/schema\/person\/7b8ba109de56e2b80e0773753109c1ce"},"image":{"@id":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/#primaryimage"},"thumbnailUrl":"http:\/\/breanneboland.com\/wp-content\/uploads\/2017\/06\/826960f478bd627a9ab4e6037ad33f14.jpg","keywords":["bash","dear past self","packer","troubleshooting"],"articleSection":["How to"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/","url":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/","name":"Pipefail Bail: When to Add (or Remove) set -u - Breanne Boland","isPartOf":{"@id":"https:\/\/breanneboland.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/#primaryimage"},"image":{"@id":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/#primaryimage"},"thumbnailUrl":"http:\/\/breanneboland.com\/wp-content\/uploads\/2017\/06\/826960f478bd627a9ab4e6037ad33f14.jpg","datePublished":"2017-06-20T04:43:55+00:00","dateModified":"2019-02-25T22:22:20+00:00","description":"In which set -eux -o pipefail turns out to be a little much for one line of a Packer build (and how to tell when that's the case).","breadcrumb":{"@id":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/#primaryimage","url":"http:\/\/breanneboland.com\/wp-content\/uploads\/2017\/06\/826960f478bd627a9ab4e6037ad33f14.jpg","contentUrl":"http:\/\/breanneboland.com\/wp-content\/uploads\/2017\/06\/826960f478bd627a9ab4e6037ad33f14.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/breanneboland.com\/blog\/2017\/06\/19\/pipefail-bail-add-or-remove-set-dash-u\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/breanneboland.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Pipefail Bail: When to Add (or Remove) set -u"}]},{"@type":"WebSite","@id":"https:\/\/breanneboland.com\/blog\/#website","url":"https:\/\/breanneboland.com\/blog\/","name":"Breanne Boland","description":"Appsec engineer, SRE, writer, UX, endless questions mostly","publisher":{"@id":"https:\/\/breanneboland.com\/blog\/#\/schema\/person\/7b8ba109de56e2b80e0773753109c1ce"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/breanneboland.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/breanneboland.com\/blog\/#\/schema\/person\/7b8ba109de56e2b80e0773753109c1ce","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/764113b6dca6b6cee982a9f690f5c44d6166de3996e918649e2bafb27cd4c8bf?s=96&d=blank&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/764113b6dca6b6cee982a9f690f5c44d6166de3996e918649e2bafb27cd4c8bf?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/764113b6dca6b6cee982a9f690f5c44d6166de3996e918649e2bafb27cd4c8bf?s=96&d=blank&r=g","caption":"admin"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/764113b6dca6b6cee982a9f690f5c44d6166de3996e918649e2bafb27cd4c8bf?s=96&d=blank&r=g"}}]}},"_links":{"self":[{"href":"https:\/\/breanneboland.com\/blog\/wp-json\/wp\/v2\/posts\/1068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/breanneboland.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/breanneboland.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/breanneboland.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/breanneboland.com\/blog\/wp-json\/wp\/v2\/comments?post=1068"}],"version-history":[{"count":5,"href":"https:\/\/breanneboland.com\/blog\/wp-json\/wp\/v2\/posts\/1068\/revisions"}],"predecessor-version":[{"id":1108,"href":"https:\/\/breanneboland.com\/blog\/wp-json\/wp\/v2\/posts\/1068\/revisions\/1108"}],"wp:attachment":[{"href":"https:\/\/breanneboland.com\/blog\/wp-json\/wp\/v2\/media?parent=1068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/breanneboland.com\/blog\/wp-json\/wp\/v2\/categories?post=1068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/breanneboland.com\/blog\/wp-json\/wp\/v2\/tags?post=1068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}