<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Lebry39</author_name>
  <author_url>https://blog.hatena.ne.jp/Lebry39/</author_url>
  <blog_title>Buri Memo:</blog_title>
  <blog_url>https://burion.net/</blog_url>
  <categories>
    <anon>shell script</anon>
    <anon>ビルド・CI/CD</anon>
    <anon>Programming</anon>
  </categories>
  <description>例えば以下のようなスクリプトがあって、その結果を bash 内で実行し標準出力を環境変数として export したい。しかも、そのスクリプトは失敗する可能性があると仮定する（インターネット接続が必要なのに繋がってない環境で実行された。設定ミスによって権限が足りてない。単純なバグ...など）。 これがビルドやデプロイのために実行されるコードだった場合（例えば Docker の entrypoint ）、実行に失敗した瞬間に安全のため処理を中断させたい。必要な環境変数を設定し損ねたアプリケーションは正常に動くとは全く期待できないし、想定してない動作をする恐れもあるため。 import sys # …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fburion.net%2Fentry%2F2023%2F01%2F29%2F014540&quot; title=&quot;失敗した場合に安全に処理を中断するためのbash内での環境変数export方法（ShellCheck に教えてもらう） - Buri Memo:&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-01-29 01:45:40</published>
  <title>失敗した場合に安全に処理を中断するためのbash内での環境変数export方法（ShellCheck に教えてもらう）</title>
  <type>rich</type>
  <url>https://burion.net/entry/2023/01/29/014540</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
